Ejemplo n.º 1
0
        public void ReferenceRule03CatchesRegexViolations()
        {
            var model = new SupplementaryDataModel
            {
                Reference     = @"Aa0 .,;:~!”@#$&’()/+-<=>[]{}^£€",
                ReferenceType = "LearnRefNumber"
            };

            var rule = new ReferenceRule03(_messageServiceMock.Object);

            Assert.False(rule.IsValid(model));
        }
Ejemplo n.º 2
0
        public void ReferenceRule03IgnoresIrrelevantReferenceTypes()
        {
            var model = new SupplementaryDataModel
            {
                Reference     = @"Aa0 .,;:~!”@#$&’()/+-<=>[]{}^£€",
                ReferenceType = "NotLearnRefNumber"
            };

            var rule = new ReferenceRule03(_messageServiceMock.Object);

            Assert.True(rule.IsValid(model));
        }
Ejemplo n.º 3
0
        public void ReferenceRule03PassesValidReferences()
        {
            var model = new SupplementaryDataModel
            {
                Reference     = @"Aa0 Zz9 ",
                ReferenceType = "LearnRefNumber"
            };

            var rule = new ReferenceRule03(_messageServiceMock.Object);

            Assert.True(rule.IsValid(model));
        }