public void SaveTest() { libraryDepartmentRepository.Save(department1); Assert.AreEqual(libraryDepartmentRepository.GetItems().Count(), countItems + 1); libraryDepartmentRepository.Save(department2); Assert.AreEqual(libraryDepartmentRepository.GetItems().Count(), countItems + 2); libraryDepartmentRepository.Save(department2); Assert.AreEqual(libraryDepartmentRepository.GetItems().Count(), countItems + 2); libraryDepartmentRepository.Remove(department2); libraryDepartmentRepository.Remove(department1); }
public LibraryDepartmentRepositoryTest() { repositoryFactory = new T(); libraryDepartmentRepository = repositoryFactory.CreateLibraryDepartmentRepository(); countItems = libraryDepartmentRepository.GetItems().Count(); department1 = new LibraryDepartment("Абонемент", true); department2 = new LibraryDepartment("Читальный зал", false); }
public LibraryDepartmentRepositoryTest() { repositoryFactory = new T(); libraryDepartmentRepository = repositoryFactory.CreateLibraryDepartmentRepository(); countItems = libraryDepartmentRepository.GetItems().Count(); }