public void CalculateAge_Should_Return_Null_If_No_BirthDate()
        {
            var patient = new PatientDemographic {
            };

            var age = patient.CalculateAge();

            Assert.Null(age);
        }
        public void CalculateAge_Should_Return_Current_Age_If_Not_Deceased()
        {
            var patient = new PatientDemographic
            {
                BirthDate  = new DateTime(1990, 1, 1),
                IsDeceased = false
            };

            var age = patient.CalculateAge();

            Assert.True(age.HasValue && age.Value >= 28);
        }
        public void CalculateAge_Should_Return_Null_If_Deceased_No_DeathDate()
        {
            var patient = new PatientDemographic
            {
                BirthDate  = new DateTime(1990, 1, 1),
                IsDeceased = true
            };

            var age = patient.CalculateAge();

            Assert.Null(age);
        }
        public void CalculateAge_Should_Return_Age_At_Death_If_Deceased_With_Date()
        {
            var patient = new PatientDemographic
            {
                BirthDate  = new DateTime(1990, 1, 1),
                IsDeceased = true,
                DeathDate  = new DateTime(2018, 1, 1)
            };

            var age = patient.CalculateAge();

            Assert.Equal(28, age.Value);
        }