public void AuthorizeSubRepController()
        {
            // SubReportsController
            Expression <System.Action> exp = (() => (new CC.Web.Controllers.SubReportsController()).Edit(default(int)));

            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).Create(default(int), default(int)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).Create(default(SubReport)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).Copy(default(Web.Models.SubReportCreateModel)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).Upload(default(Web.Models.SubReportImportModelBase)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).Import(default(Web.Models.SubReportImportModelBase)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).UpdateSubReport(default(SubReport)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).SaveMedicalEquipmentReport(default(MedicalEquipmentReport)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).SaveMhmReport(default(MhmReport)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).UpdateProgramCost(default(ProgramCost)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).DeleteProgramCost(default(int)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).DeleteMhmRow(default(int)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).DeleteMedicalEquipmentRow(default(int)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).SaveClientReport(default(ClientReport)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).Modify(default(ClientReport)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).DeleteClientReport(default(ClientReport)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.SubReportsController()).Update(default(int?), default(int), default(int)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.AgencyUser, FixedRoles.Ser
            }));
        }
        public void AuthorizeMainController()
        {
            //MainReportsController
            Expression <System.Action> exp = (() => (new CC.Web.Controllers.MainReportsController()).Create(default(Web.Models.MainReportCreateModel))); // 2nd version of create is not attributed !!

            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).Create(default(int?))); // 2nd version of create is not attributed !!
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));

            exp = (() => (new CC.Web.Controllers.MainReportsController()).AgencyRemarks(default(Web.Models.MainReportAgencyCommentsModel)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).PoRemarks(default(Web.Models.MainReportAgencyCommentsModel)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.RegionOfficer, FixedRoles.GlobalOfficer
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).Submit(default(Web.Models.SubmissionDetails)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).Submit(default(int)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser
            }));

            exp = (() => (new CC.Web.Controllers.MainReportsController()).SetAdjusted(default(int)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.GlobalOfficer
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).UnsetAdjusted(default(int)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.GlobalOfficer
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).Delete(default(int)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).Revise(default(int)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).Update(default(MainReport)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).SelectApp());
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.Ser, FixedRoles.AgencyUser
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).Approve(default(Web.Models.MainReportApproveModel)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.GlobalOfficer, FixedRoles.RegionOfficer
            }));
            exp = (() => (new CC.Web.Controllers.MainReportsController()).Reject(default(Web.Models.MainReportApproveModel)));
            Assert.IsTrue(CcAuthorizeAttributeTest.MethodHasAuthorizeAttribute(exp, new List <FixedRoles>()
            {
                FixedRoles.Admin, FixedRoles.GlobalOfficer, FixedRoles.RegionOfficer
            }));
        }