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); }
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); }
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); }
public async Task WhenIRemoveTheItem(string item) { await Context.Actor().When(Remove.TheToDoItem(item)); }
public async Task GivenIHaveAListWithTheItems(ImmutableArray <string> items) { await Context.Actor().Given(Add.TheToDoItems(items)); }
public async Task WhenIAddTheItem(string item) { await Context.Actor().When(Add.TheToDoItem(item)); }
public void ThenIShouldHaveItemsRemaining(int expectedCount) { Context.Actor().Then(TheItems.Remaining(), items => items.Should().Be(expectedCount)); }
public void WhenIRemoveTheItem(string item) { Context.Actor().When(ToDoItem.RemoveAToDoItem(item)); }
public void GivenTheApplicationInOpened() { Context.Actor().Given(Open.TheApplication()); }
public void WhenIAddTheItem(string item) { Context.Actor().When(ToDoItem.AddAToDoItem(item)); }
public void ThenIShouldHaveItemsRemaining(int expectedCount) { Context.Actor().AsksFor(TheItems.Remaining()).Should().Be(expectedCount); }
public void ThenTheTo_DoItemsListShouldNotContain(string item) { Context.Actor().Then(TheItems.Displayed(), items => items.Should().NotContain(i => i.Name == item)); }
public void ThenTheTo_DoItemsListShouldContain(string item) { Context.Actor().AsksFor(TheItems.Displayed()).Should().Contain(i => i.Name == item); }
public async Task ThenTheTo_DoItemsListShouldNotContain(string item) { await Context.Actor().Then(Get.ToDoItems, items => items.Should().NotContain(i => i.Name == item)); }
public void GivenIHaveAListWithTheItems(ImmutableArray <string> items) { Context.Actor().Given(ToDoItem.AddToDoItems(items)); }
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)); }
public void WhenIOpenTheApplication() { Context.Actor().When(Open.TheApplication()); }