public void CopyToList_CopiesEmptyRegister_ReturnsEmptyList() { BookRegister register = new BookRegister(); List <Book> copy = register.CopyToList(); copy.Count.Should().Be(0); }
public void CopyToList_CopiesRegisterToList_BooksFromListAreEqualToBooksFromRegister() { BookRegister register = new BookRegister(); Book expected1 = new Book("name", "author", "category", "language", "1999", "123"); Book expected2 = new Book("n", "a", "c", "l", "1999", "789"); register.Add(expected1); register.Add(expected2); List <Book> copy = register.CopyToList(); Book actual1 = copy[0]; Book actual2 = copy[1]; Assert.AreEqual(expected1, actual1); Assert.AreEqual(expected2, actual2); }