private void Button_Click_1(object sender, RoutedEventArgs e) { int id = int.Parse(TextBox1.Text); PayrollDatabase database = new FunctionPayrollDatabase(); DeleteEmployeeTransaction deleteEmployee = new DeleteEmployeeTransaction(id, database); deleteEmployee.Execute(); }
public void DeleteEmployee() { int empID = 4; AddCommissionedEmployee t = new AddCommissionedEmployee(empID, "Bill", "Home", 2500, 3.2); t.Execute(); Employee e = PayrollDatabase.GetEmployee(empID); Assert.IsNotNull(e); DeleteEmployeeTransaction dt = new DeleteEmployeeTransaction(empID); dt.Execute(); e = PayrollDatabase.GetEmployee(empID); Assert.IsNull(e); }
public void DeleteEmployee() { database.AddEmployee(employee); DeleteEmployeeTransaction dt = new DeleteEmployeeTransaction(employee.EmpId, database); dt.Execute(); Employee e = database.GetEmployee(employee.EmpId); Assert.That(e, Is.Null); }
public void DeleteEmployee() { int empid = 4; AddCommissionedEmployee t = new AddCommissionedEmployee(empid, "Dasha", "Slancy", 265, 123.804); t.Execute(); Employee e = PayrollDatabase.GetEmployee(empid); Assert.IsNotNull(e); DeleteEmployeeTransaction dt = new DeleteEmployeeTransaction(empid); dt.Execute(); e = PayrollDatabase.GetEmployee(empid); Assert.IsNull(e); }
public void DeleteEmployee() { int empId = SetupCommissionedEmployee(); Employee e = PayrollDatabase.GetEmployee(empId); Assert.NotNull(e); var dt = new DeleteEmployeeTransaction(empId); dt.Execute(); e = PayrollDatabase.GetEmployee(empId); Assert.Null(e); }
public void DeleteEmployee() { int empid = 5; AddCommissionedEmployee t = new AddCommissionedEmployee(empid, "Bill", "Home", 265, 123.804); t.Execute(); Employee e = PayrollDatabase.GetEmployee_Static(empid); Assert.IsNotNull(e); DeleteEmployeeTransaction dt = new DeleteEmployeeTransaction(empid); dt.Execute(); e = PayrollDatabase.GetEmployee_Static(empid); Assert.IsNull(e); }
public void DeleteEmployee() { int empId = 4; AddCommissionedEmployee t = new AddCommissionedEmployee(empId, "Bob", "Home", 2500, 3.2, database); t.Execute(); Employee e = database.GetEmployee(empId); Assert.IsNotNull(e); DeleteEmployeeTransaction dt = new DeleteEmployeeTransaction(empId, database); dt.Execute(); e = database.GetEmployee(empId); Assert.IsNull(e); }
public async Task DeleteEmployee() { int empId = 2; AddCommissionedEmployee t = new AddCommissionedEmployee(empId, "Bill", "Home", 2500, 3.2); await t.ExecuteAsync(); Employee e = await PayrollDatabase.GetEmployeeAsync(empId); Assert.NotNull(e); DeleteEmployeeTransaction dt = new DeleteEmployeeTransaction(empId); await dt.ExecuteAsync(); e = await PayrollDatabase.GetEmployeeAsync(empId); Assert.Null(e); }
public void DeleteEmployee() { int emplid = 1; string address = "1st Street"; string fullName = "Bob"; Employee e = new Employee(emplid, address, fullName); Database.AddEmployee(e); ITransaction t = new DeleteEmployeeTransaction(emplid); t.Execute(); Employee actual = Database.GetEmployee(emplid + 1); Assert.IsNull(actual); }
public void TestDeleteEmployee() { var empId = 3; AddCommissionedEmployee t = new AddCommissionedEmployee(empId, "Lance", "Home", 2500, 3.2, database); t.Execute(); var e = database.GetEmployee(empId); Assert.AreEqual(e.Name, "Lance"); var deleteEmployeeTransaction = new DeleteEmployeeTransaction(empId, database); deleteEmployeeTransaction.Execute(); e = database.GetEmployee(empId); Assert.IsNull(e); }
public void TestDeleteEmployee() { const int empId = 4; var t = new AddCommissionedEmployee(empId, "Bill", "Home", 2500, 3.2); t.Execute(); var e = PayrollDatabase.GetEmployee(empId); Assert.IsNotNull(e); var dt = new DeleteEmployeeTransaction(empId); dt.Execute(); e = PayrollDatabase.GetEmployee(empId); Assert.IsNull(e); }
public void TestDeleteEmployee() { int empId = 4; AddCommissionEmployee t = new AddCommissionEmployee(empId, "Kubing", "Home", 2500, 3.2, database); t.Execute(); Employee e = database.GetEmployee(empId); Assert.That(e, Is.Not.Null); DeleteEmployeeTransaction dt = new DeleteEmployeeTransaction(empId, database); dt.Execute(); Employee e2 = database.GetEmployee(empId); Assert.That(e2, Is.Null); }
public void TestDeleteEmployee() { int empId = 3; var addTx = new AddCommissionedEmployee(empId, "Lance", "Home", 2500, 3.2M); addTx.Execute(); var employee = Database.GetEmployee(empId); Assert.IsNotNull(employee); var deleteTx = new DeleteEmployeeTransaction(empId); deleteTx.Execute(); employee = Database.GetEmployee(empId); Assert.IsNull(employee); }
public void TestDeleteEmployee() { int empId = 4; string name = "Bartosz"; double salary = 2000.0; AddSalariedEmployee t = new AddSalariedEmployee(empId, name, "Home", salary); t.Execute(); Employee e = PayrollDatabase.GetEmployee(empId); Assert.IsNotNull(e); DeleteEmployeeTransaction dt = new DeleteEmployeeTransaction(empId); dt.Execute(); e = PayrollDatabase.GetEmployee(empId); Assert.IsNull(e); }
public void TestDeleteEmployee() { #region Arrange int employeeId = 4; AddSalariedEmployee t = new AddSalariedEmployee(employeeId, "user", "home", 1000.0); t.Execute(); Employee e = PayrollRepository.GetEmployee(employeeId); e.Should().NotBeNull(); DeleteEmployeeTransaction dt = new DeleteEmployeeTransaction(employeeId); #endregion #region Action dt.Execute(); #endregion #region Assert e = PayrollRepository.GetEmployee(employeeId); e.Should().BeNull(); #endregion }
public void ExecuteTest() { AddCommissionedEmployee t = new AddCommissionedEmployee( 7, "Bill", "Home", 2500, 3.2, database); t.Execute(); Employee e = database.GetEmployee(7); Assert.IsNotNull(e); DeleteEmployeeTransaction dt = new DeleteEmployeeTransaction(7, database); dt.Execute(); e = database.GetEmployee(7); Assert.IsNull(e); e = database.GetEmployee(7); Assert.IsNull(e); }