示例#1
0
        public void PatientMonthAgeAtSampling_ReturnsMonth(string birthDate, string samplingDate, string receivingDate, int?expectedAgeInMonth)
        {
            var isolate = new Isolate
            {
                Sending = new Sending
                {
                    Patient = new Patient
                    {
                        BirthDate = DateTime.Parse(birthDate)
                    },
                    SamplingDate = null,
                }
            };

            if (!samplingDate.IsEmpty())
            {
                isolate.Sending.SamplingDate = DateTime.Parse(samplingDate);
            }
            if (!receivingDate.IsEmpty())
            {
                isolate.Sending.ReceivingDate = DateTime.Parse(receivingDate);
            }


            isolate.PatientMonthAgeAtSampling().Should().Be(expectedAgeInMonth);
        }