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