public bool IsImmsStatusIdSetWhenNotRequired(bool isRequired, short?immsStatusId)
            {
                var status = new EmployeeDiseaseRiskStatusRecord {
                    IsRequired = isRequired, ImmunisationStatusId = immsStatusId
                };

                return(status.IsImmsStatusIdSetWhenNotRequired());
            }
            public bool IsDateProtectedSetWhenStatusNotProtected(short?immsStatusId, DateTime?dateProtected)
            {
                var status = new EmployeeDiseaseRiskStatusRecord
                {
                    ImmunisationStatusId = immsStatusId,
                    DateProtected        = dateProtected,
                };

                return(status.IsDateProtectedSetWhenStatusNotProtected());
            }
Ejemplo n.º 3
0
 public static bool HasChanges(this EmployeeDiseaseRiskStatusRecord x, EmployeeDiseaseRiskStatusRecord y)
 {
     return
         (!(x.Id == y.Id &&
            x.EmployeeId == y.EmployeeId &&
            x.ClientId.Equals(y.ClientId) &&
            x.DiseaseRiskId == y.DiseaseRiskId &&
            x.IsRequired == y.IsRequired &&
            x.ImmunisationStatusId == y.ImmunisationStatusId &&
            x.DateProtected.Equals(y.DateProtected) &&
            x.RecallActionId == y.RecallActionId &&
            x.RecallDate.Equals(y.RecallDate) &&
            x.CurrentProgress == y.CurrentProgress &&
            x.CreateDate.Equals(y.CreateDate) &&
            string.Equals(x.CreatedBy, y.CreatedBy) &&
            x.UpdatedDate.Equals(y.UpdatedDate) &&
            string.Equals(x.UpdatedBy, y.UpdatedBy) &&
            x.IsDeleted == y.IsDeleted));
 }
Ejemplo n.º 4
0
        public void Test()
        {
            var mapper = UnityConfig.Container.Resolve <IMapper>();

            var rec = new EmployeeDiseaseRiskStatusRecord {
                Id = 54
            };
            var view = new EmployeeDiseaseRiskStatus();

            var result = mapper.Map <EmployeeDiseaseRiskStatus>(rec);

            Assert.That(result.Id, Is.EqualTo(54));

            var lrec = new List <EmployeeDiseaseRiskStatusRecord> {
                rec
            };
            var results = mapper.Map <IList <EmployeeDiseaseRiskStatus> >(lrec);

            Assert.That(results.Count, Is.EqualTo(1));
            Assert.That(results[0].Id, Is.EqualTo(54));
        }
 public bool TestHasRecallDateChangedToValueInThePast(
     EmployeeDiseaseRiskStatusRecord recordUnderTest,
     EmployeeDiseaseRiskStatusRecord originalRecord)
 {
     return(recordUnderTest.HasRecallDateChangedToValueInThePast(originalRecord));
 }