public void CreateSalariedClassificationFromRow()
        {
            operation = new LoadPaymentClassificationOperation(employee, "salary", null);
            operation.Prepare();
            var row = LoadEmployeeOperationTest.ShuntRow("Salary", 2500.00);

            operation.CreateClassification(row);

            var classification = operation.Classification;

            Assert.IsTrue(classification is SalariedClassification);
            var salariedClassification = classification as SalariedClassification;

            Assert.AreEqual(2500.00, salariedClassification.Salary, 0.01);
        }
        public void CreateDirectDepositMethodFromRow()
        {
            operation = new LoadPaymentClassificationOperation(employee, "hourly", null);
            operation.Prepare();
            var row = LoadEmployeeOperationTest.ShuntRow("HourlyRate", 15.45);

            operation.CreateClassification(row);

            var classification = operation.Classification;

            Assert.IsTrue(classification is HourlyClassification);
            var hourlyClassification = classification as HourlyClassification;

            Assert.AreEqual(15.45, hourlyClassification.HourlyRate, 0.01);
        }
        public void CreateMailMethodFromRow()
        {
            operation = new LoadPaymentMethodOperation(employee, "mail", null);
            operation.Prepare();
            var row = LoadEmployeeOperationTest.ShuntRow("Address", "23 Pine Ct");

            operation.CreatePaymentMethod(row);

            var method = operation.Method;

            Assert.IsTrue(method is MailMethod);
            var mailMethod = method as MailMethod;

            Assert.AreEqual("23 Pine Ct", mailMethod.Address);
        }
        public void CreateCommisstionedClassificationFromRow()
        {
            operation = new LoadPaymentClassificationOperation(employee, "commission", null);
            operation.Prepare();
            var row = LoadEmployeeOperationTest.ShuntRow("Salary,Commission", 999.99, 9.9);

            operation.CreateClassification(row);

            var classification = operation.Classification;

            Assert.IsTrue(classification is CommissionClassification);
            var commissionClassification = classification as CommissionClassification;

            Assert.AreEqual(999.99, commissionClassification.BaseRate, 0.01);
            Assert.AreEqual(9.9, commissionClassification.CommissionRate, 0.01);
        }
        public void CreateDirectDepositMethodFromRow()
        {
            operation = new LoadPaymentMethodOperation(employee, "directdeposit", null);
            operation.Prepare();
            var row = LoadEmployeeOperationTest.ShuntRow("Bank,Account", "1st Bank", "0123456");

            operation.CreatePaymentMethod(row);

            var method = operation.Method;

            Assert.IsTrue(method is DirectDepositMethod);
            var ddMethod = method as DirectDepositMethod;

            Assert.AreEqual("1st Bank", ddMethod.Bank);
            Assert.AreEqual("0123456", ddMethod.AccountNumber);
        }