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); }
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); }
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); }
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); }
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); }
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); }
public ActionResult <List <MeetingProgram> > Get() => _programService.Get();