public void LoadHourlyClassificationCommand() { operation = new LoadPaymentClassificationOperation(employee, "hourly", null); operation.Prepare(); var command = operation.Command; Assert.AreEqual("select * from HourlyClassification where EmpId = @EmpId", command.CommandText); Assert.AreEqual(employee.EmpId, command.Parameters["@EmpId"].Value); }
public void LoadSalariedClassificationFromRow() { operation = new LoadPaymentClassificationOperation(employee, "salaried", null); operation.Prepare(); var row = DataRowUtil.ShuntRow("Salary", 1000.00); operation.InvokeCreateor(row); var classification = operation.Classification; Assert.IsTrue(classification is SalariedClassification); var salariedClassification = classification as SalariedClassification; Assert.AreEqual(1000.00, salariedClassification.Salary, .01); }