public void AddBookReaderTest() { int beforeSize = context.bookReader.Count; var beforeLastBookReader = context.bookReader.Last(); var bookReaderToAdd = new BookReader() { Age = 18, FirstName = "Oskar", LastName = "Neuman", Telephone = "665456789" }; repository.AddBookReader(bookReaderToAdd); int afterSize = context.bookReader.Count; var afterLastBookReader = context.bookReader.Last(); // check sizes Assert.AreNotEqual(beforeSize, afterSize); // check if last books aren't equal Assert.AreNotEqual(beforeLastBookReader, afterLastBookReader); // check if the book is in the list Assert.IsTrue(context.bookReader.Contains(bookReaderToAdd)); }