Exemplo n.º 1
0
        public void CanCreateFromData()
        {
            //  Arrange
            int      expectedID = currentIDIndex;
            bool     notNull;
            bool     correctID;
            IPatient patient;

            //  Act
            patient   = PatientFactory.Create(PatientHelper.GetPatientData(), PatientHelper.GetSocialData());
            notNull   = patient != null;
            correctID = patient.ID == expectedID;

            //  Assert
            Assert.True((notNull && correctID), $"Is Null: {!notNull} {{Value: {!notNull} | Expected: {false}}}<|> Correct ID: {correctID} {{Value: {( ( notNull ) ? ( patient.ID.ToString () ) : ( "NaN" ) )} | Expected: {expectedID}}}");

            currentIDIndex++;   //  Incrementing the ID index in case another patient is created after this test
        }
 public static IPatient GetNewPatient()
 {
     return(PatientFactory.Create(GetPatientData(), GetSocialData()));
 }