コード例 #1
0
        public void FindSideCode_Ignores_IncorrectDashes()
        {
            var target = new LicenseplateValidator();

            target.FindSideCode("1234AB", "NL", true);
            target.FindSideCode("1-23-4AB", "NL", true);
        }
コード例 #2
0
        public void FindSideCode_Throws_OnIncorrectDashes()
        {
            var target = new LicenseplateValidator();

            target.FindSideCode("1234AB", "NL", false);
        }
コード例 #3
0
        public void FindSideCode_Throws_OnEmptyPlate()
        {
            var target = new LicenseplateValidator();

            target.FindSideCode("   ", "NL");
        }
コード例 #4
0
        public void FindSideCode_Throws_OnNullPlate()
        {
            var target = new LicenseplateValidator();

            target.FindSideCode(null, "NL");
        }
コード例 #5
0
        public void FindSideCode_Throws_OnUnsupportedCountry()
        {
            var target = new LicenseplateValidator();

            target.FindSideCode("AB-12-CD", "XX");
        }
コード例 #6
0
        public void FindSideCode_Throws_OnUnknownSideCode()
        {
            var target = new LicenseplateValidator();

            target.FindSideCode("A1-B2-C3", "NL");
        }
コード例 #7
0
        public void FindSideCode_Returns_MatchingSideCode()
        {
            var target = new LicenseplateValidator();

            Assert.AreEqual("XX-99-XX", target.FindSideCode("AB-12-CD", "NL"));
        }