public void Get_With_Two_Objectives_Test()
            {
                StubProgramRepositoryFactory  factory = new StubProgramRepositoryFactory();
                GetPatientProgramsDataRequest request = new GetPatientProgramsDataRequest
                {
                    ContractNumber = "InHealth001",
                    Context        = "NG",
                    UserId         = "000000000000000000000000"
                };

                IProgramRepository repo = factory.GetRepository(request, RepositoryType.Program);

                MEProgram mep = repo.GetLimitedProgramFields("000000000000000000000000") as MEProgram;

                Assert.AreEqual(2, mep.Objectives.Count);
            }
            public void Get_With_Objectives_Test()
            {
                string ctrl = "123456789011111111112223";
                StubProgramRepositoryFactory  factory = new StubProgramRepositoryFactory();
                GetPatientProgramsDataRequest request = new GetPatientProgramsDataRequest
                {
                    ContractNumber = "InHealth001",
                    Context        = "NG",
                    UserId         = "000000000000000000000000"
                };

                IProgramRepository repo = factory.GetRepository(request, RepositoryType.Program);

                MEProgram mep = repo.GetLimitedProgramFields("000000000000000000000000") as MEProgram;

                Assert.IsNotNull(mep.Objectives);
            }
示例#3
0
            public void DD_FindByID_AttrEndDate()
            {
                DateTime?time = Convert.ToDateTime("1/1/1901");
                StubProgramRepositoryFactory  factory = new StubProgramRepositoryFactory();
                GetPatientProgramsDataRequest request = new GetPatientProgramsDataRequest
                {
                    ContractNumber = "InHealth001",
                    Context        = "NG",
                    UserId         = "000000000000000000000000"
                };

                IProgramRepository repo = factory.GetRepository(request, RepositoryType.PatientProgram);

                MEPatientProgram mep   = repo.FindByID("000000000000000000000000") as MEPatientProgram;
                DateTime?        tDate = mep.Modules[0].AttributeEndDate;

                Assert.AreEqual(time, tDate);
            }
示例#4
0
            public void DD_FindByID_AssignedBy()
            {
                string ctrl = "123456789011111111112223";
                StubProgramRepositoryFactory  factory = new StubProgramRepositoryFactory();
                GetPatientProgramsDataRequest request = new GetPatientProgramsDataRequest
                {
                    ContractNumber = "InHealth001",
                    Context        = "NG",
                    UserId         = "000000000000000000000000"
                };

                IProgramRepository repo = factory.GetRepository(request, RepositoryType.PatientProgram);

                MEPatientProgram mep    = repo.FindByID("000000000000000000000000") as MEPatientProgram;
                string           sample = mep.Modules[0].AssignedBy.ToString();

                Assert.AreEqual(ctrl, sample);
            }