Пример #1
0
            public void DD_Get_Action_Objectives_Test()
            {
                ProgramService ps = new ProgramService
                {
                    ProgramDataManager  = new StubProgramDataManager(),
                    Helpers             = new StubHelper(),
                    CommonFormatterUtil = new StubCommonFormatterUtil()
                };

                GetProgramDetailsSummaryRequest request = new GetProgramDetailsSummaryRequest
                {
                    Context        = "NG",
                    ContractNumber = "InHealth001",
                    PatientId      = "",
                    ProgramId      = "",
                    UserId         = "nguser",
                    Version        = 1.0
                };

                GetProgramDetailsSummaryResponse response = ps.Get(request);
                ModuleDetail             module           = response.Program.Modules.Find(m => m.SourceId == "532b5585a381168abe00042c");
                ActionsDetail            action           = module.Actions.Find(a => a.SourceId == "123456789012345678901234");
                List <ObjectiveInfoData> objs             = action.Objectives;

                Assert.IsNotNull(objs);
            }
Пример #2
0
            public void DD_Get_With_Module_Description_Test()
            {
                string desc = "BSHSI - Outreach & Enrollment";

                ProgramService ps = new ProgramService
                {
                    ProgramDataManager  = new StubProgramDataManager(),
                    Helpers             = new StubHelper(),
                    CommonFormatterUtil = new StubCommonFormatterUtil()
                };

                GetProgramDetailsSummaryRequest request = new GetProgramDetailsSummaryRequest
                {
                    Context        = "NG",
                    ContractNumber = "InHealth001",
                    PatientId      = "",
                    ProgramId      = "",
                    UserId         = "nguser",
                    Version        = 1.0
                };

                GetProgramDetailsSummaryResponse response = ps.Get(request);
                ModuleDetail module = response.Program.Modules.Find(m => m.SourceId == "532b5585a381168abe00042c");
                string       mDesc  = module.Description.Trim();

                Assert.AreEqual(desc, mDesc, true);
            }
Пример #3
0
            public void DD_Get_Action_AssignedBy_Test()
            {
                string         ctrl = "123456789011111111112233";
                ProgramService ps   = new ProgramService
                {
                    ProgramDataManager  = new StubProgramDataManager(),
                    Helpers             = new StubHelper(),
                    CommonFormatterUtil = new StubCommonFormatterUtil()
                };

                GetProgramDetailsSummaryRequest request = new GetProgramDetailsSummaryRequest
                {
                    Context        = "NG",
                    ContractNumber = "InHealth001",
                    PatientId      = "",
                    ProgramId      = "",
                    UserId         = "nguser",
                    Version        = 1.0
                };

                GetProgramDetailsSummaryResponse response = ps.Get(request);
                ModuleDetail  module = response.Program.Modules.Find(m => m.SourceId == "532b5585a381168abe00042c");
                ActionsDetail action = module.Actions.Find(a => a.SourceId == "123456789012345678901234");

                Assert.AreEqual(ctrl, action.AssignBy);
            }
Пример #4
0
            public void DD_Get_Module_AssignedOn_Test()
            {
                DateTime?time = Convert.ToDateTime("1/1/1999");

                ProgramService ps = new ProgramService
                {
                    ProgramDataManager  = new StubProgramDataManager(),
                    Helpers             = new StubHelper(),
                    CommonFormatterUtil = new StubCommonFormatterUtil()
                };

                GetProgramDetailsSummaryRequest request = new GetProgramDetailsSummaryRequest
                {
                    Context        = "NG",
                    ContractNumber = "InHealth001",
                    PatientId      = "",
                    ProgramId      = "",
                    UserId         = "nguser",
                    Version        = 1.0
                };

                GetProgramDetailsSummaryResponse response = ps.Get(request);
                ModuleDetail module = response.Program.Modules.Find(m => m.SourceId == "532b5585a381168abe00042c");
                DateTime?    mTime  = module.AssignDate;

                Assert.AreEqual(time, mTime);
            }
Пример #5
0
            public void Get_With_Objectives_Test()
            {
                ProgramService ps = new ProgramService
                {
                    ProgramDataManager  = new StubProgramDataManager(),
                    Helpers             = new StubHelper(),
                    CommonFormatterUtil = new StubCommonFormatterUtil()
                };

                GetProgramDetailsSummaryRequest request = new GetProgramDetailsSummaryRequest
                {
                    Context        = "NG",
                    ContractNumber = "InHealth001",
                    PatientId      = "",
                    ProgramId      = "",
                    UserId         = "nguser",
                    Version        = 1.0
                };

                GetProgramDetailsSummaryResponse response = ps.Get(request);

                Assert.IsNotNull(response.Program.ObjectivesData);
            }
Пример #6
0
            public void Get_With_Eligibility_EndDate_Test()
            {
                ProgramService ps = new ProgramService
                {
                    ProgramDataManager  = new StubProgramDataManager(),
                    Helpers             = new StubHelper(),
                    CommonFormatterUtil = new StubCommonFormatterUtil()
                };

                GetProgramDetailsSummaryRequest request = new GetProgramDetailsSummaryRequest
                {
                    Context        = "NG",
                    ContractNumber = "InHealth001",
                    PatientId      = "",
                    ProgramId      = "",
                    UserId         = "nguser",
                    Version        = 1.0
                };

                GetProgramDetailsSummaryResponse response = ps.Get(request);
                DateTime val = System.DateTime.UtcNow;

                Assert.AreEqual(val, response.Program.EligibilityEndDate);
            }
Пример #7
0
 public ActionResult <List <MeetingProgram> > Get() =>
 _programService.Get();