Esempio n. 1
0
        public void On_GetBreaks_Ingores_From_IgnoreList()
        {
            IPayrollConverterUtils subject = new PayrollConverterUtils(logger);
            var data       = new AlohaDataset();
            var adjtimeRow = AlohaDataUtils.CreateAdjTimeRow(data, 1, "", DateTime.Today, DateTime.Today, DateTime.Today, 1, 12, 0, 12, 30, 0.5m, 10m, 10m);

            data.adjtime.AddadjtimeRow(adjtimeRow);
            var ignoreList = new List <int> {
                1
            };

            List <Transaction> result = subject.GetBreaks(data, ignoreList);

            result.Should().BeEmpty();
        }
Esempio n. 2
0
        public void On_GetBreaks_Get_TransactionEnumerable()
        {
            IPayrollConverterUtils subject = new PayrollConverterUtils(logger);
            var data        = new AlohaDataset();
            var gndbreakRow = AlohaDataUtils.CreateBreakRow(data, 1, "", DateTime.Today, DateTime.Today, DateTime.Today, 1, 12, 0, 12, 30, 0.5m);

            data.gndbreak.AddgndbreakRow(gndbreakRow);
            var ignoreList = new List <int> {
                10
            };

            List <Transaction> result = subject.GetBreaks(data, ignoreList);

            result.Should().NotBeNull();
            result.Should().NotBeEmpty();
            result.Should().Contain(c => c.EmpId == 1);
        }
Esempio n. 3
0
        public void On_GetBreaks_Gets_All_Transactions()
        {
            IPayrollConverterUtils subject = new PayrollConverterUtils(logger);
            var data         = new AlohaDataset();
            var gndbreakRow  = AlohaDataUtils.CreateBreakRow(data, 1, "", DateTime.Today, DateTime.Today, DateTime.Today, 1, 12, 0, 12, 30, 0.5m);
            var gndbreakRow2 = AlohaDataUtils.CreateBreakRow(data, 2, "", DateTime.Today, DateTime.Today, DateTime.Today, 1, 1, 0, 1, 30, 0.5m);

            data.gndbreak.AddgndbreakRow(gndbreakRow);
            data.gndbreak.AddgndbreakRow(gndbreakRow2);
            var ignoreList = new List <int> {
                10
            };

            var result = subject.GetBreaks(data, ignoreList);

            result.Count().Should().Be(data.gndbreak.Count());
            result.Should().Contain(t => t.EmpId == 1);
            result.Should().Contain(t => t.EmpId == 2);
        }