public void Get_Valid_Response_Test() { IAuditUtil audit = new StubAuditUtil(); INGManager ngm = new StubNGManager(); ISecurityManager sm = new StubSecurityManager(); ICommonFormatterUtil cf = new StubCommonFormatterUtil(); NGService ngs = new NGService { AuditUtil = audit, NGManager = ngm, Security = sm, CommonFormatterUtil = cf }; GetPatientProgramDetailsSummaryRequest request = new GetPatientProgramDetailsSummaryRequest { ContractNumber = "NG", PatientId = "", Token = "dsafgsdfgdafg", UserId = "", Version = 1.0 }; GetPatientProgramDetailsSummaryResponse response = ngs.Get(request); Assert.IsNotNull(response); }
public void Get_AssignById_Test() { IAuditUtil audit = new StubAuditUtil(); INGManager ngm = new StubNGManager(); ISecurityManager sm = new StubSecurityManager(); ICommonFormatterUtil cf = new StubCommonFormatterUtil(); string userid = "000000000000000000000000"; NGService ngs = new NGService { AuditUtil = audit, NGManager = ngm, Security = sm, CommonFormatterUtil = cf }; GetPatientProgramDetailsSummaryRequest request = new GetPatientProgramDetailsSummaryRequest { ContractNumber = "NG", PatientId = "", Token = "dsafgsdfgdafg", UserId = userid, Version = 1.0 }; GetPatientProgramDetailsSummaryResponse response = ngs.Get(request); string result = response.Program.AssignById; Assert.AreEqual(userid, result); }
public void Post() { IAuditUtil audit = new StubAuditUtil(); INGManager ngm = new StubNGManager(); ISecurityManager sm = new StubSecurityManager(); ICommonFormatterUtil cf = new StubCommonFormatterUtil(); NGService ngs = new NGService { AuditUtil = audit, NGManager = ngm, Security = sm, CommonFormatterUtil = cf }; PostProgramAttributesChangeRequest request = new PostProgramAttributesChangeRequest { ContractNumber = "NG", PatientId = "", Token = "dsafgsdfgdafg", UserId = "", Version = 1.0 }; PostProgramAttributesChangeResponse response = ngs.Post(request); Assert.IsNotNull(response); }
public void AD_Get_With_Module_Description_Test() { string desc = "BSHSI - Outreach & Enrollment"; IAuditUtil audit = new StubAuditUtil(); INGManager ngm = new StubNGManager(); ISecurityManager sm = new StubSecurityManager(); ICommonFormatterUtil cf = new StubCommonFormatterUtil(); NGService ngs = new NGService { AuditUtil = audit, NGManager = ngm, Security = sm, CommonFormatterUtil = cf }; GetPatientProgramDetailsSummaryRequest request = new GetPatientProgramDetailsSummaryRequest { ContractNumber = "NG", PatientId = "", Token = "dsafgsdfgdafg", UserId = "", Version = 1.0 }; GetPatientProgramDetailsSummaryResponse response = ngs.Get(request); Module module = response.Program.Modules.Find(m => m.SourceId == "532b5585a381168abe00042c"); string mDesc = module.Description.Trim(); Assert.AreEqual(desc, mDesc, true); }
public void Get_StateChangeDate_Test() { IAuditUtil audit = new StubAuditUtil(); INGManager ngm = new StubNGManager(); ISecurityManager sm = new StubSecurityManager(); ICommonFormatterUtil cf = new StubCommonFormatterUtil(); string userid = "000000000000000000000000"; DateTime now = System.DateTime.UtcNow.Date; NGService ngs = new NGService { AuditUtil = audit, NGManager = ngm, Security = sm, CommonFormatterUtil = cf }; GetPatientProgramDetailsSummaryRequest request = new GetPatientProgramDetailsSummaryRequest { ContractNumber = "NG", PatientId = "", Token = "dsafgsdfgdafg", UserId = userid, Version = 1.0 }; GetPatientProgramDetailsSummaryResponse response = ngs.Get(request); DateTime statechangedate = ((DateTime)response.Program.StateUpdatedOn).Date; Assert.AreEqual(now, statechangedate); }
public void GetObjectives() { // Arrange StubNGManager ngManager = new StubNGManager(); GetAllObjectivesRequest request = new GetAllObjectivesRequest { ContractNumber = _contractNumber, Token = _token, Version = _version, }; // Act List <ObjectivesLookUp> response = ngManager.GetAllObjectives(request); //Assert Assert.IsTrue(response.Count > 0); }
public void GetRecentPatients_Limit_Test() { INGManager ngm = new StubNGManager(); // { PlanElementUtils = new StubPlanElementUtils(), EndPointUtils = new StubPlanElementEndpointUtils() }; GetRecentPatientsRequest request = new GetRecentPatientsRequest { Version = version, ContractNumber = contractNumber, UserId = userId, Context = context, ContactId = contactId }; GetRecentPatientsResponse response = ngm.GetRecentPatients(request); Assert.IsTrue(response.Limit >= response.Patients.Count); }
public void GetRecentPatientsForAContact_Test() { INGManager ngm = new StubNGManager(); // { PlanElementUtils = new StubPlanElementUtils(), EndPointUtils = new StubPlanElementEndpointUtils() }; GetRecentPatientsRequest request = new GetRecentPatientsRequest { Version = version, ContractNumber = contractNumber, UserId = userId, Context = context, ContactId = contactId }; GetRecentPatientsResponse response = ngm.GetRecentPatients(request); Assert.AreEqual(response.ContactId, request.ContactId); }
public void InsertContact_ShouldNotReturnNull_Test() { InsertContactRequest request = new InsertContactRequest() { ContractNumber = "InHealth001", UserId = "5325c821072ef705080d3488", Token = ObjectId.GenerateNewId().ToString(), Version = 1.0, Contact = new Contact() { FirstName = "Carl", LastName = "Lewis", } }; INGManager ngManager = new StubNGManager(); var response = ngManager.InsertContact(request); Assert.IsNotNull(response); }
private INGManager GetNGManager() { INGManager ngManager = new StubNGManager(); return(ngManager); }