Browse Source

Fixed typo of the variable name

pull/13082/head
malik masis 4 years ago
parent
commit
4c7e4c8e2e
  1. 35
      modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Polls/PollViewComponentManager_Test.cs

35
modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Polls/PollViewComponentManager_Test.cs

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Shouldly;
@ -27,10 +26,10 @@ public class PollViewComponentManager_Test : CmsKitDomainTestBase
[Widget Type= ""Poll"" PollName =""poll-name""]
Thanks _for_ *your * feedback.";
var page = await pollManager.ParseAsync(content);
var poll = await pollManager.ParseAsync(content);
page.ShouldNotBeNull();
page.Count.ShouldBe(1);//Ignored Widget
poll.ShouldNotBeNull();
poll.Count.ShouldBe(1);//Ignored Widget
}
[Fact]
@ -42,10 +41,10 @@ public class PollViewComponentManager_Test : CmsKitDomainTestBase
[Widget Type= ""Poll"" PollName =""poll-name""]
Thanks _for_ *your * feedback.";
var page = await pollManager.ParseAsync(content);
var poll = await pollManager.ParseAsync(content);
page.ShouldNotBeNull();
page.Count.ShouldBe(2);
poll.ShouldNotBeNull();
poll.Count.ShouldBe(2);
}
[Fact]
@ -57,10 +56,10 @@ public class PollViewComponentManager_Test : CmsKitDomainTestBase
[Widget Wrong Type= ""Poll"" PollName =""poll-name""]
Thanks _for_ *your * feedback.";
var page = await pollManager.ParseAsync(content);
var poll = await pollManager.ParseAsync(content);
page.ShouldNotBeNull();
page.Count.ShouldBe(2);
poll.ShouldNotBeNull();
poll.Count.ShouldBe(2);
}
[Fact]
@ -72,22 +71,22 @@ public class PollViewComponentManager_Test : CmsKitDomainTestBase
[Widget Type= ""Poll"" PollWrongName =""poll-name""]
Thanks _for_ *your * feedback.";
var page = await pollManager.ParseAsync(content);
var poll = await pollManager.ParseAsync(content);
page.ShouldNotBeNull();
page.Count.ShouldBe(2);
poll.ShouldNotBeNull();
poll.Count.ShouldBe(2);
}
[Theory]
[MemberData(nameof(ExampleData))]
[MemberData(nameof(ExampleData))]
public async Task ParseAsync_ShouldWorkProperlyWithCorrectInputs(string content, int expectedLine)
{
_options.Value.AddWidgetConfig(testData.PollName, new ContentWidgetConfig(testData.WidgetName));
var page = await pollManager.ParseAsync(content);
var poll = await pollManager.ParseAsync(content);
page.ShouldNotBeNull();
page.Count.ShouldBe(expectedLine);
poll.ShouldNotBeNull();
poll.Count.ShouldBe(expectedLine);
}
public static IEnumerable<object[]> ExampleData =>

Loading…
Cancel
Save