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

Loading…
Cancel
Save