コード例 #1
0
        public void GivenIncorrectDataToAddToDepartmentTable_WhenDatabaseIsConnected_ShouldReturnFalse()
        {
            // Act
            EmployeeRepo  repo   = new EmployeeRepo();
            EmployeeModel model  = new EmployeeModel();
            bool          actual = repo.AddEmployeeDepartmentER(model);

            // Assert
            Assert.IsFalse(actual);
        }
コード例 #2
0
        public void GivencorrectDataToAddToDepartmentTable_WhenDatabaseIsConnected_ShouldReturnTrue()
        {
            // Act
            EmployeeRepo  repo  = new EmployeeRepo();
            EmployeeModel model = new EmployeeModel();

            model.Department   = "delivery";
            model.DepartmentNo = 5;
            bool actual = repo.AddEmployeeDepartmentER(model);

            Assert.IsTrue(actual);
        }