public void ShouldRateABook() { fixture.ApplicationStarted(); fixture.HasSampleBooks(); fixture.HasBook("Ogniem i mieczem", "Henryk Sienkiewicz", "978-83-08-06015-5", "Wydawnictwo Literackie", 2016, "Podręczniki i lektury szkolne"); long id = fixture.BookIdByTitle("Ogniem i mieczem"); const int Rating = 4; //when fixture.UserEnters($"rate {id} {Rating}"); fixture.UserEnters("search ogniem i mieczem"); fixture.Then(); fixture.SystemShows($"Ogniem i mieczem rated: {Rating}"); fixture.SystemShows($"Ogniem i mieczem* rating: {Rating}"); }
public void ShouldShowHelloAtTheBegining() { fixture.ApplicationStarted(); fixture.HasSampleBooks(); fixture.Then(); fixture.SystemShows("Welcome to the ArqLibrarian"); }
public void ShouldSearchByTitle() { fixture.ApplicationStarted(); fixture.HasSampleBooks(); fixture.HasBook("Ogniem i mieczem", "Henryk Sienkiewicz", "978-83-08-06015-5", "Wydawnictwo Literackie", 2016, "Podręczniki i lektury szkolne"); //when fixture.UserEnters("search Ogniem i mieczem"); fixture.Then(); fixture.SystemShows("Found: 'Ogniem i mieczem'"); fixture.SystemShows(Title("Ogniem i mieczem")); }
public void ShouldSearchAllBooks() { fixture.ApplicationStarted(); fixture.HasSampleBooks(); fixture.UserEnters("search"); fixture.Then(); fixture.SystemShows(LibraryFixture.Title("Karolcia")); fixture.SystemShows(LibraryFixture.Author("Maria Kruger")); fixture.SystemShows(LibraryFixture.Title("Renesans")); fixture.SystemShows(LibraryFixture.Author("Jerzy Konieczny")); fixture.SystemShowsAtLeastLines(fixture.StartBooksCount); }
public void ShouldBorrowABook() { fixture.ApplicationStarted(); fixture.HasSampleBooks(); fixture.HasSampleUsers(); fixture.HasBook("Ogniem i mieczem", "Henryk Sienkiewicz", "978-83-08-06015-5", "Wydawnictwo Literackie", 2016, "Podręczniki i lektury szkolne"); var id = fixture.BookIdByTitle("Ogniem i mieczem"); //when fixture.UserEnters($"borrow {id}"); fixture.UserEnters($"status {id}"); fixture.Then(); fixture.SystemShows("[borrowedd]*Ogniem i mieczem*"); }