public void should_be_able_to_add_a_book_without_passing_in_name() { var newBook = BookToAdd("edition", "book", "author"); GivenValidBook("book", "edition"); GivenValidPath(); var book = Subject.AddBook(newBook); book.Title.Should().Be(_fakeBook.Title); }
public void should_be_able_to_add_a_album_without_passing_in_name() { var newAlbum = AlbumToAdd("edition", "book", "author"); GivenValidAlbum("edition"); GivenValidPath(); var album = Subject.AddBook(newAlbum); album.Title.Should().Be(_fakeAlbum.Title); }
public void should_throw_if_book_cannot_be_found() { var newBook = BookToAdd("edition", "book", "author"); Mocker.GetMock <IProvideBookInfo>() .Setup(s => s.GetBookInfo("book")) .Throws(new BookNotFoundException("edition")); Assert.Throws <ValidationException>(() => Subject.AddBook(newBook)); ExceptionVerification.ExpectedErrors(1); }