Пример #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);
 }
Пример #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);
        }
Пример #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);
        }
Пример #4
0
 public async Task WhenIRemoveTheItem(string item)
 {
     await Context.Actor().When(Remove.TheToDoItem(item));
 }
Пример #5
0
 public async Task GivenIHaveAListWithTheItems(ImmutableArray <string> items)
 {
     await Context.Actor().Given(Add.TheToDoItems(items));
 }
Пример #6
0
 public async Task WhenIAddTheItem(string item)
 {
     await Context.Actor().When(Add.TheToDoItem(item));
 }
Пример #7
0
 public void ThenIShouldHaveItemsRemaining(int expectedCount)
 {
     Context.Actor().Then(TheItems.Remaining(), items => items.Should().Be(expectedCount));
 }
Пример #8
0
 public void WhenIRemoveTheItem(string item)
 {
     Context.Actor().When(ToDoItem.RemoveAToDoItem(item));
 }
Пример #9
0
 public void GivenTheApplicationInOpened()
 {
     Context.Actor().Given(Open.TheApplication());
 }
Пример #10
0
 public void WhenIAddTheItem(string item)
 {
     Context.Actor().When(ToDoItem.AddAToDoItem(item));
 }
Пример #11
0
 public void ThenIShouldHaveItemsRemaining(int expectedCount)
 {
     Context.Actor().AsksFor(TheItems.Remaining()).Should().Be(expectedCount);
 }
Пример #12
0
 public void ThenTheTo_DoItemsListShouldNotContain(string item)
 {
     Context.Actor().Then(TheItems.Displayed(), items => items.Should().NotContain(i => i.Name == item));
 }
Пример #13
0
 public void ThenTheTo_DoItemsListShouldContain(string item)
 {
     Context.Actor().AsksFor(TheItems.Displayed()).Should().Contain(i => i.Name == item);
 }
Пример #14
0
 public async Task ThenTheTo_DoItemsListShouldNotContain(string item)
 {
     await Context.Actor().Then(Get.ToDoItems, items => items.Should().NotContain(i => i.Name == item));
 }
Пример #15
0
 public void GivenIHaveAListWithTheItems(ImmutableArray <string> items)
 {
     Context.Actor().Given(ToDoItem.AddToDoItems(items));
 }
Пример #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));
 }
Пример #17
0
 public void WhenIOpenTheApplication()
 {
     Context.Actor().When(Open.TheApplication());
 }