Пример #1
0
        public void Ctor_ShouldReturIncomTax_Success()
        {
            SelfEmployeeCalculation selfEmployeeCalculation = new SelfEmployeeCalculation(CreataContext(baseAmount: 10000));

            Assert.NotNull(selfEmployeeCalculation);
            Assert.AreEqual(1004m, selfEmployeeCalculation.TaxAmount);
        }
Пример #2
0
        public void Ctor_TaxAmountShouldBeRound()
        {
            SelfEmployeeCalculation selfEmployeeCalculation = new SelfEmployeeCalculation(CreataContext(baseAmount: 10000));

            Assert.NotNull(selfEmployeeCalculation);
            Assert.IsTrue((selfEmployeeCalculation.TaxAmount % 1) == 0);
        }
Пример #3
0
        public void Ctor_ShouldReturnIncomeTaxZero_IfTaxBaseSumLessOrEqualZero()
        {
            SelfEmployeeCalculation selfEmployeeCalculation = new SelfEmployeeCalculation(CreataContext());

            Assert.NotNull(selfEmployeeCalculation);
            Assert.AreEqual(0, selfEmployeeCalculation.TaxAmount);
        }
Пример #4
0
        public void Ctor_SetInsuranceContribution_Success()
        {
            SelfEmployeeCalculation selfEmployeeCalculation = new SelfEmployeeCalculation(CreataContext());

            Assert.NotNull(selfEmployeeCalculation);
            Assert.NotNull(selfEmployeeCalculation.InsuranceContribution);
        }
Пример #5
0
        public void CalcualteVatAmount_Success()
        {
            SelfEmployeeCalculation selfEmployeeCalculation = new SelfEmployeeCalculation(CreataContext());

            Assert.NotNull(selfEmployeeCalculation);
            Assert.AreEqual(230m, selfEmployeeCalculation.VatAmount);
        }
Пример #6
0
        public void CalculateVatAmount_SetZero_IfTaxBaseAmountLessOrEqualZero()
        {
            SelfEmployeeCalculation selfEmployeeCalculation = new SelfEmployeeCalculation(CreataContext(baseAmount: 0m));

            Assert.NotNull(selfEmployeeCalculation);
            Assert.AreEqual(0, selfEmployeeCalculation.VatAmount);
        }
Пример #7
0
        public void Ctor_CalcuateNetPay_Success()
        {
            SelfEmployeeCalculation selfEmployeeCalculation = new SelfEmployeeCalculation(CreataContext(baseAmount: 10000));

            Assert.NotNull(selfEmployeeCalculation);

            Assert.AreEqual(7263.84m, selfEmployeeCalculation.NetPay);
        }
Пример #8
0
        public void Ctor_SetParameters_Success()
        {
            SelfEmployeeCalculation selfEmployeeCalculation = new SelfEmployeeCalculation(CreataContext());

            Assert.NotNull(selfEmployeeCalculation.TaxBaseAmount);
            Assert.AreEqual(BASEAMOUNT, selfEmployeeCalculation.TaxBaseAmount);
            Assert.AreEqual(INCOMECOSTAMOUNT, selfEmployeeCalculation.IncomeCostsAmount);
        }