Пример #1
0
        public void Passports_Should_Pass_Strict_Validation()
        {
            var passports = PassportReader.ReadPassports(ValidData).ToArray();

            var validPassports = passports.Count(x => x.IsValid(true));

            // all passports should be valid
            validPassports.Should().Be(passports.Length);
        }
Пример #2
0
        public void Passports_Should_Fail_Strict_Validation()
        {
            var passports = PassportReader.ReadPassports(InvalidData);

            var validPassports = passports.Count(x => x.IsValid(true));

            // all passports should be invalid
            validPassports.Should().Be(0);
        }
Пример #3
0
        public void Should_Map_Passports()
        {
            var passports = PassportReader.ReadPassports(Data).ToArray();

            passports.Should().HaveCount(4);
        }