Ejemplo n.º 1
0
 public ReportDataBuilder SetMasjidTableBankFinanceData(FinanceData masjidTableBankFinanceData)
 {
     _masjidTableBankFinanceData = masjidTableBankFinanceData;
     return(this);
 }
Ejemplo n.º 2
0
 public ReportDataBuilder SetBaitulMalFinanceData(FinanceData baitulMalFinanceData)
 {
     _baitulMalFinanceData = baitulMalFinanceData;
     return(this);
 }
Ejemplo n.º 3
0
 public ReportDataBuilder SetADayMasjidProjectFinanceData(FinanceData aDayMasjidProjectFinanceData)
 {
     _aDayMasjidProjectFinanceData = aDayMasjidProjectFinanceData;
     return(this);
 }
Ejemplo n.º 4
0
        public ReportUpdateData(MemberReportData memberMemberReportData      = null,
                                MemberReportData associateMemberReportData   = null,
                                MemberReportData preliminaryMemberReportData = null,
                                MemberReportData supporterMemberReportData   = null,

                                MeetingProgramReportData workerMeetingProgramReportData      = null,
                                MeetingProgramReportData dawahMeetingProgramReportData       = null,
                                MeetingProgramReportData stateLeaderMeetingProgramReportData = null,
                                MeetingProgramReportData stateOutingMeetingProgramReportData = null,
                                MeetingProgramReportData iftarMeetingProgramReportData       = null,
                                MeetingProgramReportData learningMeetingProgramReportData    = null,
                                MeetingProgramReportData socialDawahMeetingProgramReportData = null,
                                MeetingProgramReportData dawahGroupMeetingProgramReportData  = null,
                                MeetingProgramReportData nextGMeetingProgramReportData       = null,

                                MeetingProgramReportData cmsMeetingProgramReportData         = null,
                                MeetingProgramReportData smMeetingProgramReportData          = null,
                                MeetingProgramReportData memberMeetingProgramReportData      = null,
                                MeetingProgramReportData tafsirMeetingProgramReportData      = null,
                                MeetingProgramReportData unitMeetingProgramReportData        = null,
                                MeetingProgramReportData familyVisitMeetingProgramReportData = null,
                                MeetingProgramReportData eidReunionMeetingProgramReportData  = null,
                                MeetingProgramReportData bbqMeetingProgramReportData         = null,
                                MeetingProgramReportData gatheringMeetingProgramReportData   = null,
                                MeetingProgramReportData otherMeetingProgramReportData       = null,

                                FinanceReportData baitulMalFinanceReportData         = null,
                                FinanceReportData aDayMasjidProjectFinanceReportData = null,
                                FinanceReportData masjidTableBankFinanceReportData   = null,

                                SocialWelfareReportData qardeHasanaSocialWelfareReportData  = null,
                                SocialWelfareReportData patientVisitSocialWelfareReportData = null,
                                SocialWelfareReportData socialVisitSocialWelfareReportData  = null,
                                SocialWelfareReportData transportSocialWelfareReportData    = null,
                                SocialWelfareReportData shiftingSocialWelfareReportData     = null,
                                SocialWelfareReportData shoppingSocialWelfareReportData     = null,

                                SocialWelfareReportData foodDistributionSocialWelfareReportData = null,
                                SocialWelfareReportData cleanUpAustraliaSocialWelfareReportData = null,
                                SocialWelfareReportData otherSocialWelfareReportData            = null,

                                MaterialData bookSaleMaterialReportData         = null,
                                MaterialData bookDistributionMaterialReportData = null,
                                LibraryStockData bookLibraryStockReportData     = null,

                                MaterialData otherSaleMaterialReportData         = null,
                                MaterialData otherDistributionMaterialReportData = null,
                                LibraryStockData otherLibraryStockReportData     = null,

                                MaterialData vhsSaleMaterialReportData         = null,
                                MaterialData vhsDistributionMaterialReportData = null,
                                LibraryStockData vhsLibraryStockReportData     = null,

                                MaterialData emailDistributionMaterialReportData       = null,
                                MaterialData ipdcLeafletDistributionMaterialReportData = null,


                                TeachingLearningProgramData groupStudyTeachingLearningProgramReportData           = null,
                                TeachingLearningProgramData studyCircleTeachingLearningProgramReportData          = null,
                                TeachingLearningProgramData practiceDarsTeachingLearningProgramReportData         = null,
                                TeachingLearningProgramData stateLearningCampTeachingLearningProgramReportData    = null,
                                TeachingLearningProgramData quranStudyTeachingLearningProgramReportData           = null,
                                TeachingLearningProgramData quranClassTeachingLearningProgramReportData           = null,
                                TeachingLearningProgramData memorizingAyatTeachingLearningProgramReportData       = null,
                                TeachingLearningProgramData stateLearningSessionTeachingLearningProgramReportData = null,
                                TeachingLearningProgramData stateQiyamulLailTeachingLearningProgramReportData     = null,

                                TeachingLearningProgramData studyCircleForAssociateMemberTeachingLearningProgramReportData = null,
                                TeachingLearningProgramData hadithTeachingLearningProgramReportData = null,
                                TeachingLearningProgramData weekendIslamicSchoolTeachingLearningProgramReportData = null,
                                TeachingLearningProgramData memorizingHadithTeachingLearningProgramReportData     = null,
                                TeachingLearningProgramData memorizingDoaTeachingLearningProgramReportData        = null,
                                TeachingLearningProgramData otherTeachingLearningProgramReportData = null,
                                string comment = null)
        {
            AssociateMemberReportData           = associateMemberReportData ?? MemberData.Default();
            PreliminaryMemberReportData         = preliminaryMemberReportData ?? MemberData.Default();
            SupporterMemberReportData           = supporterMemberReportData ?? MemberData.Default();
            WorkerMeetingProgramReportData      = workerMeetingProgramReportData ?? MeetingProgramData.Default();
            DawahMeetingProgramReportData       = dawahMeetingProgramReportData ?? MeetingProgramData.Default();
            StateLeaderMeetingProgramReportData = stateLeaderMeetingProgramReportData ?? MeetingProgramData.Default();
            StateOutingMeetingProgramReportData = stateOutingMeetingProgramReportData ?? MeetingProgramData.Default();
            IftarMeetingProgramReportData       = iftarMeetingProgramReportData ?? MeetingProgramData.Default();
            LearningMeetingProgramReportData    = learningMeetingProgramReportData ?? MeetingProgramData.Default();
            SocialDawahMeetingProgramReportData = socialDawahMeetingProgramReportData ?? MeetingProgramData.Default();
            DawahGroupMeetingProgramReportData  = dawahGroupMeetingProgramReportData ?? MeetingProgramData.Default();
            NextGMeetingProgramReportData       = nextGMeetingProgramReportData ?? MeetingProgramData.Default();


            CMSMeetingProgramReportData         = cmsMeetingProgramReportData ?? MeetingProgramData.Default();
            SMMeetingProgramReportData          = smMeetingProgramReportData ?? MeetingProgramData.Default();
            MemberMeetingProgramReportData      = memberMeetingProgramReportData ?? MeetingProgramData.Default();
            TafsirMeetingProgramReportData      = tafsirMeetingProgramReportData ?? MeetingProgramData.Default();
            UnitMeetingProgramReportData        = unitMeetingProgramReportData ?? MeetingProgramData.Default();
            FamilyVisitMeetingProgramReportData = familyVisitMeetingProgramReportData ?? MeetingProgramData.Default();
            EidReunionMeetingProgramReportData  = eidReunionMeetingProgramReportData ?? MeetingProgramData.Default();
            BBQMeetingProgramReportData         = bbqMeetingProgramReportData ?? MeetingProgramData.Default();
            GatheringMeetingProgramReportData   = gatheringMeetingProgramReportData ?? MeetingProgramData.Default();

            OtherMeetingProgramReportData = otherMeetingProgramReportData ?? MeetingProgramData.Default();

            MemberMemberReportData = memberMemberReportData ?? MemberData.Default();

            BaitulMalFinanceReportData         = baitulMalFinanceReportData ?? FinanceData.Default();
            ADayMasjidProjectFinanceReportData = aDayMasjidProjectFinanceReportData ?? FinanceData.Default();
            MasjidTableBankFinanceReportData   = masjidTableBankFinanceReportData ?? FinanceData.Default();

            QardeHasanaSocialWelfareReportData  = qardeHasanaSocialWelfareReportData ?? SocialWelfareData.Default();
            PatientVisitSocialWelfareReportData = patientVisitSocialWelfareReportData ?? SocialWelfareData.Default();
            SocialVisitSocialWelfareReportData  = socialVisitSocialWelfareReportData ?? SocialWelfareData.Default();
            TransportSocialWelfareReportData    = transportSocialWelfareReportData ?? SocialWelfareData.Default();
            ShiftingSocialWelfareReportData     = shiftingSocialWelfareReportData ?? SocialWelfareData.Default();
            ShoppingSocialWelfareReportData     = shoppingSocialWelfareReportData ?? SocialWelfareData.Default();

            FoodDistributionSocialWelfareReportData = foodDistributionSocialWelfareReportData ?? SocialWelfareData.Default();
            CleanUpAustraliaSocialWelfareReportData = cleanUpAustraliaSocialWelfareReportData ?? SocialWelfareData.Default();
            OtherSocialWelfareReportData            = otherSocialWelfareReportData ?? SocialWelfareData.Default();

            BookSaleMaterialReportData                            = bookSaleMaterialReportData ?? MaterialData.Default();
            BookDistributionMaterialReportData                    = bookDistributionMaterialReportData ?? MaterialData.Default();
            BookLibraryStockReportData                            = bookLibraryStockReportData ?? LibraryStockData.Default();
            OtherSaleMaterialReportData                           = otherSaleMaterialReportData ?? MaterialData.Default();
            OtherDistributionMaterialReportData                   = otherDistributionMaterialReportData ?? MaterialData.Default();
            OtherLibraryStockReportData                           = otherLibraryStockReportData ?? LibraryStockData.Default();
            VhsSaleMaterialReportData                             = vhsSaleMaterialReportData ?? MaterialData.Default();
            VhsDistributionMaterialReportData                     = vhsDistributionMaterialReportData ?? MaterialData.Default();
            VhsLibraryStockReportData                             = vhsLibraryStockReportData ?? LibraryStockData.Default();
            EmailDistributionMaterialReportData                   = emailDistributionMaterialReportData ?? MaterialData.Default();
            IpdcLeafletDistributionMaterialReportData             = ipdcLeafletDistributionMaterialReportData ?? MaterialData.Default();
            GroupStudyTeachingLearningProgramReportData           = groupStudyTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            StudyCircleTeachingLearningProgramReportData          = studyCircleTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            PracticeDarsTeachingLearningProgramReportData         = practiceDarsTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            StateLearningCampTeachingLearningProgramReportData    = stateLearningCampTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            QuranStudyTeachingLearningProgramReportData           = quranStudyTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            QuranClassTeachingLearningProgramReportData           = quranClassTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            MemorizingAyatTeachingLearningProgramReportData       = memorizingAyatTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            StateLearningSessionTeachingLearningProgramReportData = stateLearningSessionTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            StateQiyamulLailTeachingLearningProgramReportData     = stateQiyamulLailTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();

            StudyCircleForAssociateMemberTeachingLearningProgramReportData = studyCircleForAssociateMemberTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            HadithTeachingLearningProgramReportData = hadithTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            WeekendIslamicSchoolTeachingLearningProgramReportData = weekendIslamicSchoolTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            MemorizingHadithTeachingLearningProgramReportData     = memorizingHadithTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            MemorizingDoaTeachingLearningProgramReportData        = memorizingDoaTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            OtherTeachingLearningProgramReportData = otherTeachingLearningProgramReportData ?? TeachingLearningProgramData.Default();
            Comment = comment;
        }
Ejemplo n.º 5
0
        public async Task Handle_SavesReport(ReportingFrequency reportingFrequency)
        {
            DateTimeDbTestExtensions.SetUtcNowToRandomDate();

            var testParams = Endpoint.ArrangeOnSqlSession(AssemblySetupFixture.EndpointTestContainer,
                                                          s =>
            {
                var username      = DataProvider.Get <string>();
                var year          = 2019;
                var reportingTerm = ReportingTerm.One;
                var organization  = new OrganizationBuilder()
                                    .SetOrganizationType(OrganizationType.State)
                                    .SetReportingFreQuency(reportingFrequency)
                                    .BuildAndPersist(s);

                var report = new StateReportBuilder()
                             .SetOrganization(organization)
                             .SetReportingPeriod(new ReportingPeriod(reportingFrequency, reportingTerm, year))
                             .Build();
                report.MarkStatusAsPlanPromoted();
                s.Save(report);
                var memberMemberData = new TestObjectBuilder <MemberData>()
                                       .Build();
                var associateMemberData = new TestObjectBuilder <MemberData>()
                                          .Build();

                var preliminaryMemberData = new TestObjectBuilder <MemberData>()
                                            .Build();

                //Todo pass random data once supporterMember is added to the StateReport
                var supporterMemberData = new TestObjectBuilder <MemberData>()
                                          .Build();

                var workerMeetingProgramData      = new TestObjectBuilder <MeetingProgramData>().Build();
                var dawahMeetingProgramData       = new TestObjectBuilder <MeetingProgramData>().Build();
                var stateLeaderMeetingProgramData = new TestObjectBuilder <MeetingProgramData>().Build();
                var stateOutingMeetingProgramData = new TestObjectBuilder <MeetingProgramData>().Build();
                var iftarMeetingProgramData       = new TestObjectBuilder <MeetingProgramData>().Build();
                var learningMeetingProgramData    = new TestObjectBuilder <MeetingProgramData>().Build();
                var socialDawahMeetingProgramData = new TestObjectBuilder <MeetingProgramData>().Build();
                var dawahGroupMeetingProgramData  = new TestObjectBuilder <MeetingProgramData>().Build();
                var nextGMeetingProgramData       = new TestObjectBuilder <MeetingProgramData>().Build();

                var cmsMeetingProgramData         = new TestObjectBuilder <MeetingProgramData>().Build();
                var smMeetingProgramData          = new TestObjectBuilder <MeetingProgramData>().Build();
                var memberMeetingProgramData      = new TestObjectBuilder <MeetingProgramData>().Build();
                var tafsirMeetingProgramData      = new TestObjectBuilder <MeetingProgramData>().Build();
                var unitMeetingProgramData        = new TestObjectBuilder <MeetingProgramData>().Build();
                var familyVisitMeetingProgramData = new TestObjectBuilder <MeetingProgramData>().Build();
                var eidReunionMeetingProgramData  = new TestObjectBuilder <MeetingProgramData>().Build();
                var bbqMeetingProgramData         = new TestObjectBuilder <MeetingProgramData>().Build();
                var gatheringMeetingProgramData   = new TestObjectBuilder <MeetingProgramData>().Build();
                var otherMeetingProgramData       = new TestObjectBuilder <MeetingProgramData>().Build();

                var groupStudyTeachingLearningProgramData                    = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var studyCircleTeachingLearningProgramData                   = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var practiceDarsTeachingLearningProgramData                  = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var stateLearningCampTeachingLearningProgramData             = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var quranStudyTeachingLearningProgramData                    = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var quranClassTeachingLearningProgramData                    = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var memorizingAyatTeachingLearningProgramData                = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var stateLearningSessionTeachingLearningProgramData          = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var stateQiyamulLailTeachingLearningProgramData              = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var studyCircleForAssociateMemberTeachingLearningProgramData = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var hadithTeachingLearningProgramData = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var weekendIslamicSchoolTeachingLearningProgramData = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var memorizingHadithTeachingLearningProgramData     = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var memorizingDoaTeachingLearningProgramData        = new TestObjectBuilder <TeachingLearningProgramData>().Build();
                var otherTeachingLearningProgramData = new TestObjectBuilder <TeachingLearningProgramData>().Build();


                var baitulMalFinanceData         = FinanceData.Default();
                var aDayMasjidProjectFinanceData = FinanceData.Default();
                var masjidTableBankFinanceData   = FinanceData.Default();

                var qardeHasanaSocialWelfareData  = SocialWelfareData.Default();
                var patientVisitSocialWelfareData = SocialWelfareData.Default();
                var socialVisitSocialWelfareData  = SocialWelfareData.Default();

                var transportSocialWelfareData        = SocialWelfareData.Default();
                var shiftingSocialWelfareData         = SocialWelfareData.Default();
                var shoppingSocialWelfareData         = SocialWelfareData.Default();
                var foodDistributionSocialWelfareData = SocialWelfareData.Default();
                var cleanUpAustraliaSocialWelfareData = SocialWelfareData.Default();
                var otherSocialWelfareData            = SocialWelfareData.Default();

                var bookSaleMaterialData                = MaterialData.Default();
                var bookDistributionMaterialData        = MaterialData.Default();
                var bookLibraryStockData                = LibraryStockData.Default();
                var otherSaleMaterialData               = MaterialData.Default();
                var otherDistributionMaterialData       = MaterialData.Default();
                var otherLibraryStockData               = LibraryStockData.Default();
                var vhsSaleMaterialData                 = MaterialData.Default();
                var vhsDistributionMaterialData         = MaterialData.Default();
                var vhsLibraryStockData                 = LibraryStockData.Default();
                var emailDistributionMaterialData       = MaterialData.Default();
                var ipdcLeafletDistributionMaterialData = MaterialData.Default();

                //var bookLibraryStockData = LibraryStockData.Default();
                //var vhsLibraryStockData = LibraryStockData.Default();

                var comment = DataProvider.Get <string>();


                ReportUpdateData stateReportUpdateData = new ReportDataBuilder()
                                                         .SetMemberMemberData(memberMemberData)
                                                         .SetAssociateMemberData(associateMemberData)
                                                         .SetPreliminaryMemberData(preliminaryMemberData)
                                                         .SetSupporterMemberData(supporterMemberData)

                                                         .SetWorkerMeetingProgramData(workerMeetingProgramData)
                                                         .SetDawahMeetingProgramData(dawahMeetingProgramData)
                                                         .SetStateLeaderMeetingProgramData(stateLeaderMeetingProgramData)
                                                         .SetStateOutingMeetingProgramData(stateOutingMeetingProgramData)
                                                         .SetIftarMeetingProgramData(iftarMeetingProgramData)
                                                         .SetLearningMeetingProgramData(learningMeetingProgramData)
                                                         .SetSocialDawahMeetingProgramData(socialDawahMeetingProgramData)
                                                         .SetDawahGroupMeetingProgramData(dawahGroupMeetingProgramData)
                                                         .SetNextGMeetingProgramData(nextGMeetingProgramData)

                                                         .SetCmsMeetingProgramData(cmsMeetingProgramData)
                                                         .SetSmMeetingProgramData(smMeetingProgramData)
                                                         .SetMemberMeetingProgramData(memberMeetingProgramData)
                                                         .SetTafsirMeetingProgramData(tafsirMeetingProgramData)
                                                         .SetUnitMeetingProgramData(unitMeetingProgramData)
                                                         .SetFamilyVisitMeetingProgramData(familyVisitMeetingProgramData)
                                                         .SetEidReunionMeetingProgramData(eidReunionMeetingProgramData)
                                                         .SetBbqMeetingProgramData(bbqMeetingProgramData)
                                                         .SetGatheringMeetingProgramData(gatheringMeetingProgramData)
                                                         .SetOtherMeetingProgramData(otherMeetingProgramData)

                                                         .SetGroupStudyTeachingLearningProgramData(groupStudyTeachingLearningProgramData)
                                                         .SetStudyCircleTeachingLearningProgramData(studyCircleTeachingLearningProgramData)
                                                         .SetPracticeDarsTeachingLearningProgramData(practiceDarsTeachingLearningProgramData)
                                                         .SetStateLearningCampTeachingLearningProgramData(stateLearningCampTeachingLearningProgramData)
                                                         .SetQuranStudyTeachingLearningProgramData(quranStudyTeachingLearningProgramData)
                                                         .SetQuranClassTeachingLearningProgramData(quranClassTeachingLearningProgramData)
                                                         .SetMemorizingAyatTeachingLearningProgramData(memorizingAyatTeachingLearningProgramData)
                                                         .SetStateLearningSessionTeachingLearningProgramData(stateLearningSessionTeachingLearningProgramData)
                                                         .SetStateQiyamulLailTeachingLearningProgramData(stateQiyamulLailTeachingLearningProgramData)

                                                         .SetBaitulMalFinanceData(baitulMalFinanceData)
                                                         .SetADayMasjidProjectFinanceData(aDayMasjidProjectFinanceData)
                                                         .SetMasjidTableBankFinanceData(masjidTableBankFinanceData)

                                                         .SetQardeHasanaSocialWelfareData(qardeHasanaSocialWelfareData)
                                                         .SetPatientVisitSocialWelfareData(patientVisitSocialWelfareData)
                                                         .SetSocialVisitSocialWelfareData(socialVisitSocialWelfareData)
                                                         .SetTransportSocialWelfareData(transportSocialWelfareData)
                                                         .SetShiftingSocialWelfareData(shiftingSocialWelfareData)
                                                         .SetShoppingSocialWelfareData(shoppingSocialWelfareData)

                                                         .SetFoodDistributionSocialWelfareData(foodDistributionSocialWelfareData)
                                                         .SetCleanUpAustraliaSocialWelfareData(cleanUpAustraliaSocialWelfareData)
                                                         .SetOtherSocialWelfareData(otherSocialWelfareData)

                                                         .SetBookSaleMaterialData(bookSaleMaterialData)
                                                         .SetBookDistributionMaterialData(bookDistributionMaterialData)
                                                         .SetBookLibraryStockData(bookLibraryStockData)

                                                         .SetOtherSaleMaterialData(otherSaleMaterialData)
                                                         .SetOtherDistributionMaterialData(otherDistributionMaterialData)
                                                         .SetOtherLibraryStockData(otherLibraryStockData)

                                                         .SetVhsSaleMaterialData(vhsSaleMaterialData)
                                                         .SetVhsDistributionMaterialData(vhsDistributionMaterialData)
                                                         .SetVhsLibraryStockData(vhsLibraryStockData)

                                                         .SetEmailDistributionMaterialData(emailDistributionMaterialData)
                                                         .SetIpdcLeafletDistributionMaterialData(ipdcLeafletDistributionMaterialData)

                                                         .SetGroupStudyTeachingLearningProgramData(groupStudyTeachingLearningProgramData)
                                                         .SetStudyCircleTeachingLearningProgramData(studyCircleTeachingLearningProgramData)
                                                         .SetPracticeDarsTeachingLearningProgramData(practiceDarsTeachingLearningProgramData)
                                                         .SetStateLearningCampTeachingLearningProgramData(stateLearningCampTeachingLearningProgramData)
                                                         .SetQuranStudyTeachingLearningProgramData(quranStudyTeachingLearningProgramData)
                                                         .SetQuranClassTeachingLearningProgramData(quranClassTeachingLearningProgramData)
                                                         .SetMemorizingAyatTeachingLearningProgramData(memorizingAyatTeachingLearningProgramData)
                                                         .SetStateLearningSessionTeachingLearningProgramData(stateLearningSessionTeachingLearningProgramData)
                                                         .SetStateQiyamulLailTeachingLearningProgramData(stateQiyamulLailTeachingLearningProgramData)

                                                         .SetStudyCircleForAssociateMemberTeachingLearningProgramData(studyCircleForAssociateMemberTeachingLearningProgramData)
                                                         .SetHadithTeachingLearningProgramData(hadithTeachingLearningProgramData)
                                                         .SetWeekendIslamicSchoolTeachingLearningProgramData(weekendIslamicSchoolTeachingLearningProgramData)
                                                         .SetMemorizingHadithTeachingLearningProgramData(memorizingHadithTeachingLearningProgramData)
                                                         .SetMemorizingDoaTeachingLearningProgramData(memorizingDoaTeachingLearningProgramData)
                                                         .SetOtherTeachingLearningProgramData(otherTeachingLearningProgramData)

                                                         .SetComment(comment)

                                                         .Build();

                EntityReference reportRef = report;
                var expectedEvt           = Test.CreateInstance <IStateReportUpdated>(e =>
                {
                    e.Organization = organization;
                    e.Username     = username;
                    e.StateReport  = reportRef;
                });

                return(new
                {
                    Cmd = new UpdateStateReportCommand(report.Id,
                                                       stateReportUpdateData),
                    Report = report,
                    username,
                    expectedEvt
                });
            });

            var context = await Endpoint.Act <UpdateStateReportCommandHandler>(AssemblySetupFixture.EndpointTestContainer,
                                                                               (h, ctx) =>
            {
                ctx.SetUsernameOnHeader(testParams.username);
                return(h.Handle(testParams.Cmd, ctx));
            });

            var evt = context.ExpectPublish <IStateReportUpdated>();

            Endpoint.AssertOnSqlSessionThat(AssemblySetupFixture.EndpointTestContainer,
                                            s =>
            {
                var stateReport = s.Get <StateReport>(testParams.Cmd.ReportId);
                stateReport.Should().NotBeNull();

                stateReport.Should().BeEquivalentTo(testParams.Report, e =>
                                                    e.Excluding(p => p.MemberMemberData)
                                                    .Excluding(p => p.AssociateMemberData)
                                                    .Excluding(p => p.PreliminaryMemberData)
                                                    .Excluding(p => p.SupporterMemberData)
                                                    .Excluding(p => p.WorkerMeetingProgramData)
                                                    .Excluding(p => p.DawahMeetingProgramData)
                                                    .Excluding(p => p.StateLeaderMeetingProgramData)
                                                    .Excluding(p => p.StateOutingMeetingProgramData)
                                                    .Excluding(p => p.IftarMeetingProgramData)
                                                    .Excluding(p => p.LearningMeetingProgramData)
                                                    .Excluding(p => p.SocialDawahMeetingProgramData)
                                                    .Excluding(p => p.DawahGroupMeetingProgramData)
                                                    .Excluding(p => p.NextGMeetingProgramData)

                                                    .Excluding(p => p.CmsMeetingProgramData)
                                                    .Excluding(p => p.SmMeetingProgramData)
                                                    .Excluding(p => p.MemberMeetingProgramData)
                                                    .Excluding(p => p.TafsirMeetingProgramData)
                                                    .Excluding(p => p.UnitMeetingProgramData)
                                                    .Excluding(p => p.FamilyVisitMeetingProgramData)
                                                    .Excluding(p => p.EidReunionMeetingProgramData)
                                                    .Excluding(p => p.BbqMeetingProgramData)
                                                    .Excluding(p => p.GatheringMeetingProgramData)
                                                    .Excluding(p => p.OtherMeetingProgramData)

                                                    .Excluding(p => p.GroupStudyTeachingLearningProgramData)
                                                    .Excluding(p => p.StudyCircleTeachingLearningProgramData)
                                                    .Excluding(p => p.PracticeDarsTeachingLearningProgramData)
                                                    .Excluding(p => p.StateLearningCampTeachingLearningProgramData)
                                                    .Excluding(p => p.QuranStudyTeachingLearningProgramData)
                                                    .Excluding(p => p.QuranClassTeachingLearningProgramData)
                                                    .Excluding(p => p.MemorizingAyatTeachingLearningProgramData)
                                                    .Excluding(p => p.StateLearningSessionTeachingLearningProgramData)
                                                    .Excluding(p => p.StateQiyamulLailTeachingLearningProgramData)

                                                    .Excluding(p => p.StudyCircleForAssociateMemberTeachingLearningProgramData)
                                                    .Excluding(p => p.HadithTeachingLearningProgramData)
                                                    .Excluding(p => p.WeekendIslamicSchoolTeachingLearningProgramData)
                                                    .Excluding(p => p.MemorizingHadithTeachingLearningProgramData)
                                                    .Excluding(p => p.MemorizingDoaTeachingLearningProgramData)
                                                    .Excluding(p => p.OtherTeachingLearningProgramData)

                                                    .Excluding(p => p.BookSaleMaterialData)
                                                    .Excluding(p => p.BookDistributionMaterialData)
                                                    .Excluding(p => p.BookLibraryStockData)

                                                    .Excluding(p => p.OtherSaleMaterialData)
                                                    .Excluding(p => p.OtherDistributionMaterialData)
                                                    .Excluding(p => p.OtherLibraryStockData)

                                                    .Excluding(p => p.VhsSaleMaterialData)
                                                    .Excluding(p => p.VhsDistributionMaterialData)
                                                    .Excluding(p => p.VhsLibraryStockData)

                                                    .Excluding(p => p.EmailDistributionMaterialData)
                                                    .Excluding(p => p.IpdcLeafletDistributionMaterialData)

                                                    .Excluding(p => p.BaitulMalFinanceData)
                                                    .Excluding(p => p.ADayMasjidProjectFinanceData)
                                                    .Excluding(p => p.MasjidTableBankFinanceData)


                                                    .Excluding(p => p.QardeHasanaSocialWelfareData)
                                                    .Excluding(p => p.PatientVisitSocialWelfareData)
                                                    .Excluding(p => p.SocialVisitSocialWelfareData)
                                                    .Excluding(p => p.TransportSocialWelfareData)
                                                    .Excluding(p => p.ShiftingSocialWelfareData)
                                                    .Excluding(p => p.ShoppingSocialWelfareData)
                                                    .Excluding(p => p.FoodDistributionSocialWelfareData)
                                                    .Excluding(p => p.CleanUpAustraliaSocialWelfareData)
                                                    .Excluding(p => p.OtherSocialWelfareData)
                                                    .Excluding(p => p.Comment)
                                                    );

                ReportData reportData             = stateReport;
                ReportUpdateData reportUpdateData = reportData;
                reportUpdateData.Should().BeEquivalentTo(testParams.Cmd.ReportUpdateData);

                evt.Should().BeEquivalentTo(testParams.expectedEvt, e => e.Excluding(p => p.SerializedData));
                evt.SerializedData.Should().NotBe(null);
            });
        }
Ejemplo n.º 6
0
 public void WrongSymbol()
 {
     IFinanceDataService some          = FinanceDataServiceFactory.getWeatherDataService(FinanceDataServiceFactory.FinanceDataImport.YAHOO);
     FinanceData         yahooInstance = some.getFinanceData("SDFDFDPOI");
 }
Ejemplo n.º 7
0
 private FinanceReportData CreateFinanceReportDataFromLastPeriod(FinanceData lastPeriodReportData)
 {
     return(new FinanceReportData(lastPeriodReportData.WorkerPromiseThisPeriod, Money.Zero(), Money.Zero(), lastPeriodReportData.Balance, lastPeriodReportData.Collection, lastPeriodReportData.Expense, lastPeriodReportData.NisabPaidToCentral, lastPeriodReportData.Comment));
 }
Ejemplo n.º 8
0
 public void NoConnection()
 {
     IFinanceDataService some          = FinanceDataServiceFactory.getWeatherDataService(FinanceDataServiceFactory.FinanceDataImport.YAHOO);
     FinanceData         yahooInstance = some.getFinanceData("GOOG");
 }
Ejemplo n.º 9
0
 /// <summary> Controller action for currency exchange rate conversion </summary>
 /// <param name="from">Currecy to convert from</param>
 /// <param name="to">Currency to convert to</param>
 public String ExchangeRate(String from, String to)
 {
     return(FinanceData.QueryExchangeRate(from, to));
 }
Ejemplo n.º 10
0
 public async Task RemoveFinance([FromBody] FinanceData data)
 {
     await _service.RemoveFinance(data);
 }
Ejemplo n.º 11
0
 public async Task EditFinance([FromBody] FinanceData data)
 {
     data.Money = data.Money.Replace('.', ',');
     await _service.EditFinance(data);
 }
Ejemplo n.º 12
0
 public async Task AddFinance([FromBody] FinanceData data)
 {
     data.Money = data.Money.Replace('.', ',');
     await _service.AddFinance(data, User.Identity.Name);
 }