Пример #1
0
        public void IsValid_Should_Return_True_When_Order_Is_Valid()
        {
            var validator = new RecOrderValidator();
            var order     = new RecognitionOrder()
            {
                DestinationFolder = "testFolder",
                EmailAddress      = "*****@*****.**",
                PhoneNumber       = "+48123456789",
                SourcePath        = "testSource",
                RecognitionName   = "testName",
                PatternFaces      = new string[] { "testFace" }
            };

            Assert.True(validator.IsValid(order));
        }
Пример #2
0
        public void IsValid_Should_Return_False_When_Pattern_Faces_Array_Is_Empty()
        {
            var validator = new RecOrderValidator();

            var order = new RecognitionOrder()
            {
                DestinationFolder = "testFolder",
                EmailAddress      = "*****@*****.**",
                PhoneNumber       = "+123456789",
                PhotosSource      = "testSource",
                RecognitionName   = "testName",
                PatternFaces      = new string[] {}
            };

            Assert.False(validator.IsValid(order));
        }