Exemple #1
0
        public void HasValidDays(
            int?yearOfBirth,
            int?monthOfBirth,
            int?dayOfBirth,
            int?yearOfDeath,
            int?monthOfDeath,
            int?dayOfDeath,
            bool expectedResult)
        {
            var fluffyDateOfBirth =
                new Logic
                .Validate
                .FluffyDate(yearOfBirth, monthOfBirth, dayOfBirth);

            var fluffyDateOfDeath =
                new Logic
                .Validate
                .FluffyDate(yearOfDeath, monthOfDeath, dayOfDeath);

            var birthVsDeathDate =
                new Logic
                .Validate
                .BirthVsDeathDate(
                    fluffyDateOfBirth,
                    fluffyDateOfDeath);

            Assert.Equal(
                expectedResult,
                birthVsDeathDate.HasValidDays);
        }
Exemple #2
0
        public void HasValidYears(
            int?yearOfBirth,
            int?yearOfDeath,
            bool expectedResult)
        {
            var fluffyDateOfBirth =
                new Logic.Validate.FluffyDate(yearOfBirth, null, null);

            var fluffyDateOfDeath =
                new Logic.Validate.FluffyDate(yearOfDeath, null, null);

            var birthVsDeathDate =
                new Logic
                .Validate
                .BirthVsDeathDate(
                    fluffyDateOfBirth,
                    fluffyDateOfDeath);

            Assert.Equal(
                expectedResult,
                birthVsDeathDate.HasValidYears);
        }