Esempio n. 1
0
        public void Can_Get_Entry_Based_On_Salary()
        {
            var table = new IncomeTaxTable();

            table.AddNewEntry(37001, 80000, 3572);

            var entry = table.GetEntry(60050);

            Assert.AreEqual(37001, entry.Min);
            Assert.AreEqual(80000, entry.Max);
        }
Esempio n. 2
0
        public void Can_Get_Entry()
        {
            var table = new IncomeTaxTable();

            table.AddNewEntry(0, 18200, 0);

            var entry = table.GetEntry(0, 18200);

            Assert.AreEqual(0, entry.Min);
            Assert.AreEqual(18200, entry.Max);
            Assert.AreEqual(0, entry.Value);
        }
Esempio n. 3
0
        public void Can_Get_Entry_With_Plus()
        {
            var table = new IncomeTaxTable();

            var plusInfo = new PlusInfo {
                PlusValue = 0.325, PlusOver = 37000
            };

            table.AddNewEntry(37001, 80000, 3572, plusInfo);

            var entry = table.GetEntry(37001, 80000);

            Assert.AreEqual(37001, entry.Min);
            Assert.AreEqual(80000, entry.Max);
            Assert.AreEqual(3572, entry.Value);
            Assert.AreEqual(0.325, entry.PlusInfo.PlusValue);
            Assert.AreEqual(37000, entry.PlusInfo.PlusOver);
        }
Esempio n. 4
0
        public void Getting_Not_Existing_Entry_Based_On_Salary_Should_Throw()
        {
            var table = new IncomeTaxTable();

            table.GetEntry(60050);
        }
Esempio n. 5
0
        public void Getting_Not_Existing_Entry_Should_Throw()
        {
            var table = new IncomeTaxTable();

            table.GetEntry(0, 18200);
        }