Esempio n. 1
0
        public void Jul3()
        {
            var arg = SampleDir.Jul3_GRY();
            var db  = arg.Collections.For(3.July(2018));
            var mkt = arg.MarketState;
            var sut = new StallsInventoryReport(db, mkt);

            sut.Count.Should().Be(3);
            var dry   = sut.Single(_ => _.Section.Id == DRY);
            var frz   = sut.Single(_ => _.Section.Id == FRZ);
            var wet   = sut.Single(_ => _.Section.Id == WET);
            var total = sut.SummaryRows?.FirstOrDefault();

            dry.TotalCount.Should().Be(68);
            dry.TotalRent.Should().Be(11767);
            dry.Occupieds.Count.Should().Be(38);
            dry.OccupiedRent.Should().Be(6615);
            dry.OccupiedRate.Should().BeApproximately(0.56M, 0.01M);
            dry.Vacants.Count.Should().Be(30);
            dry.VacantRent.Should().Be(5152);
            dry.VacantRate.Should().BeApproximately(0.44M, 0.01M);

            frz.TotalCount.Should().Be(8);
            frz.TotalRent.Should().Be(0);
            frz.Occupieds.Count.Should().Be(0);
            frz.OccupiedRent.Should().Be(0);
            frz.OccupiedRate.Should().BeApproximately(0, 0.01M);
            frz.Vacants.Count.Should().Be(8);
            frz.VacantRent.Should().Be(0);
            frz.VacantRate.Should().BeApproximately(1, 0.01M);

            wet.TotalCount.Should().Be(104);
            wet.TotalRent.Should().Be(8720);
            wet.Occupieds.Count.Should().Be(71);
            wet.OccupiedRent.Should().Be(6030);
            wet.OccupiedRate.Should().BeApproximately(0.68M, 0.01M);
            wet.Vacants.Count.Should().Be(33);
            wet.VacantRent.Should().Be(2690);
            wet.VacantRate.Should().BeApproximately(0.32M, 0.01M);

            total.Should().NotBeNull();
            total.TotalCount.Should().Be(68 + 8 + 104);
            total.TotalRent.Should().Be(11767 + 0 + 8720);
            total.Occupieds.Count.Should().Be(38 + 0 + 71);
            total.OccupiedRent.Should().Be(6615 + 0 + 6030);
            total.OccupiedRate.Should().BeApproximately(0.606M, 0.01M);
            total.Vacants.Count.Should().Be(30 + 8 + 33);
            total.VacantRent.Should().Be(5152 + 0 + 2690);
            total.VacantRate.Should().BeApproximately(0.394M, 0.01M);
        }
Esempio n. 2
0
        public void Jul3()
        {
            var arg = SampleDir.Jul3_GRY();
            var db  = arg.Collections.For(3.July(2018));
            var sut = CollectorsPerformanceReport.New(arg.MarketState, db);

            sut.Should().HaveCount(1);
            sut[0].Should().HaveCount(94);

            // sample exact rent payment
            var row = sut[0].Single(_ => _.Lease.Id == 104);

            row.Stall.Name.Should().Be("WET 089");
            row.Rent.Target.Should().Be(90);
            row.Rent.Actual.Should().Be(90);
            row.Rent.NoExcess.Should().Be(90);
            row.Rent.Shortage.Should().Be(0);
            row.Rent.Overage.Should().Be(0);

            // sample rent overpaid 1
            row = sut[0].Single(_ => _.Lease.Id == 80);
            row.Stall.Name.Should().Be("DRY 040");
            row.Rent.Target.Should().Be(63);
            row.Rent.Actual.Should().Be(203);
            row.Rent.NoExcess.Should().Be(63);
            row.Rent.Shortage.Should().Be(0);
            row.Rent.Overage.Should().Be(140);

            // sample rent underpaid 1
            row = sut[0].Single(_ => _.Lease.Id == 48);
            row.Stall.Name.Should().Be("WET 102");
            row.Rent.Target.Should().Be(208.09M);
            row.Rent.Actual.Should().Be(205);
            row.Rent.NoExcess.Should().Be(205);
            row.Rent.Shortage.Should().Be(3.09M);
            row.Rent.Overage.Should().Be(0);

            // sample w/ negative rent balance
            row = sut[0].Single(_ => _.Lease.Id == 81);
            row.Stall.Name.Should().Be("WET 024");
            row.Rent.Target.Should().Be(0);
            row.Rent.Actual.Should().Be(90);
            row.Rent.NoExcess.Should().Be(0);
            row.Rent.Shortage.Should().Be(0);
            row.Rent.Overage.Should().Be(90);
        }
        public void Jul3()
        {
            var arg = SampleDir.Jul3_GRY();
            var sut = DailyStatusReport.New(arg, 3.July(2018));

            sut.StallsInventory.Should().HaveCount(3);

            sut.SectionColxns.Should().HaveCount(4);

            sut.OtherColxns.Should().HaveCount(1);
            sut.OtherColxns.SummaryRows.Should().HaveCount(1);
            sut.OtherColxns.SummaryRows[0].Amount.Should().Be(434);

            sut.BankDeposits.Should().HaveCount(2);
            sut.BankDeposits.SummaryRows.Should().HaveCount(1);
            sut.BankDeposits.SummaryRows[0].Amount.Should().Be(14135);

            sut.CollectorsPerf.Should().HaveCount(1);
            //sut.CollectorsPerf[0].
        }
Esempio n. 4
0
        public void Jul3()
        {
            var arg = SampleDir.Jul3_GRY();
            var db  = arg.Collections.For(3.July(2018));
            var sut = CollectorsPerformanceReport.New(arg.MarketState, db);

            sut.Should().HaveCount(1);
            sut[0].Collector.Should().NotBeNull();
            sut[0].Collector.Name.Should().Contain("Pasalu");
            sut[0].Assignment.Should().Be("DRY, WET");

            var covr = sut[0].StallCoverage;

            covr.ActiveStallsCount.Should().Be(101);
            covr.CollectedsCount.Should().Be(94);
            covr.UncollectedsCount.Should().Be(7);
            covr.NoOperationsCount.Should().Be(8);
            covr.CoverageRate.Should().BeApproximately(0.93M, 0.01M);

            var rent = sut[0].RentBill;

            rent.Target.Should().Be(15013.1M);
            rent.NoExcess.Should().Be(10574.35M);
            rent.UnderpaidCount.Should().Be(15);
            rent.UnderpaidTotal.Should().Be(4438.75M);
            rent.OverpaidCount.Should().Be(55);
            rent.OverpaidTotal.Should().Be(1240.65M);
            rent.PerfRate.Should().BeApproximately(0.70M, 0.01M);

            var rights = sut[0].RightsBill;

            rights.Target.Should().Be(1881);
            rights.NoExcess.Should().Be(116);
            rights.UnderpaidCount.Should().Be(31);
            rights.UnderpaidTotal.Should().Be(1840);
            rights.OverpaidCount.Should().Be(0);
            rights.OverpaidTotal.Should().Be(0);
            rights.PerfRate.Should().BeApproximately(0.06M, 0.01M);
        }