Пример #1
0
        public void AddDepartmentTest()
        {
            List <IDepartment> departments = _dataContext.GetAllDepartments();
            int departmentsNum             = departments.Count;

            Department testDepartment = new Department(20, "testDep", "testDepGroup", DateTime.Now);

            Assert.IsFalse(departments.Contains(testDepartment));

            _dataContext.AddDepartment(testDepartment);

            departments = _dataContext.GetAllDepartments();

            Assert.AreEqual(departmentsNum + 1, departments.Count);
            Assert.IsTrue(departments.Contains(testDepartment));
        }