Example #1
0
 public void ThenTheTo_DoItemsListShouldContainTimes(string item, int times)
 {
     Context.Actor().AsksFor(TheItems.Displayed())
     .Where(i => i.Name == item)
     .Should()
     .HaveCount(times, "Expected to have {0} items in collection", times);
 }
Example #2
0
        public void After()
        {
            Debug.WriteLine(_reportingStringBuilder.ToString());
            Context.Actor().Given(new SaveScreenshotsAction());
            var htmReport = Context.Actor().AsksFor(new ActorHtmlReportQuestion());

            Context.Get <ChromeDriver>().Dispose();
            File.WriteAllText(Path.Combine(GetScreenshotsPath(), "Report.html"), htmReport);
        }
Example #3
0
        public void After()
        {
            var toDoItemRepository = (IToDoItemRepository)Host.Services.GetService(typeof(IToDoItemRepository));

            toDoItemRepository.Clear();
            if (TestLevel != TestLevel.UI)
            {
                return;
            }
            Debug.WriteLine(_reportingStringBuilder.ToString());
            Context.Actor().Given(new SaveScreenshotsAction());
            var htmReport = Context.Actor().AsksFor(new ActorHtmlReportQuestion());

            Context.Get <ChromeDriver>().Dispose();
            File.WriteAllText(Path.Combine(GetScreenshotsPath(), "Report.html"), htmReport);
        }
Example #4
0
 public async Task WhenIRemoveTheItem(string item)
 {
     await Context.Actor().When(Remove.TheToDoItem(item));
 }
Example #5
0
 public async Task GivenIHaveAListWithTheItems(ImmutableArray <string> items)
 {
     await Context.Actor().Given(Add.TheToDoItems(items));
 }
Example #6
0
 public async Task WhenIAddTheItem(string item)
 {
     await Context.Actor().When(Add.TheToDoItem(item));
 }
Example #7
0
 public void ThenIShouldHaveItemsRemaining(int expectedCount)
 {
     Context.Actor().Then(TheItems.Remaining(), items => items.Should().Be(expectedCount));
 }
Example #8
0
 public void WhenIRemoveTheItem(string item)
 {
     Context.Actor().When(ToDoItem.RemoveAToDoItem(item));
 }
Example #9
0
 public void GivenTheApplicationInOpened()
 {
     Context.Actor().Given(Open.TheApplication());
 }
Example #10
0
 public void WhenIAddTheItem(string item)
 {
     Context.Actor().When(ToDoItem.AddAToDoItem(item));
 }
 public void ThenIShouldHaveItemsRemaining(int expectedCount)
 {
     Context.Actor().AsksFor(TheItems.Remaining()).Should().Be(expectedCount);
 }
Example #12
0
 public void ThenTheTo_DoItemsListShouldNotContain(string item)
 {
     Context.Actor().Then(TheItems.Displayed(), items => items.Should().NotContain(i => i.Name == item));
 }
Example #13
0
 public void ThenTheTo_DoItemsListShouldContain(string item)
 {
     Context.Actor().AsksFor(TheItems.Displayed()).Should().Contain(i => i.Name == item);
 }
Example #14
0
 public async Task ThenTheTo_DoItemsListShouldNotContain(string item)
 {
     await Context.Actor().Then(Get.ToDoItems, items => items.Should().NotContain(i => i.Name == item));
 }
Example #15
0
 public void GivenIHaveAListWithTheItems(ImmutableArray <string> items)
 {
     Context.Actor().Given(ToDoItem.AddToDoItems(items));
 }
Example #16
0
 public async Task ThenTheTo_DoItemsListShouldContainTimes(string item, int times)
 {
     await Context.Actor().Then(Get.ToDoItems, items => items.Where(i => i.Name == item)
                                .Should()
                                .HaveCount(times, "Expected to have {0} items in collection", times));
 }
Example #17
0
 public void WhenIOpenTheApplication()
 {
     Context.Actor().When(Open.TheApplication());
 }