예제 #1
0
        public void Test_Validate_MediaModel_EmptyAltText()
        {
            MediaModel media = new MediaModel()
            {
                MediaId = 12345, Group = "profile", GroupIdentifier = "*****@*****.**", Uri = "https://notblobstorage/%22"
            };

            var validationContext = new ValidationContext(media);

            Assert.NotEmpty(media.Validate(validationContext));
        }
예제 #2
0
        public void Test_Validate_MediaModel_EmptyUri()
        {
            MediaModel media = new MediaModel()
            {
                MediaId = 12345, Group = "profile", GroupIdentifier = "*****@*****.**", AltText = "hat"
            };

            var validationContext = new ValidationContext(media);

            Assert.NotEmpty(media.Validate(validationContext));
        }
예제 #3
0
        public void Test_Validate_MediaModel_EmptyGroupIdentifier()
        {
            MediaModel media = new MediaModel()
            {
                EntityId = 12345, Group = "profiles", Uri = "https://notblobstorage/%22", AltText = "hat"
            };

            var validationContext = new ValidationContext(media);

            Assert.NotEmpty(media.Validate(validationContext));
        }
예제 #4
0
        public void Test_Validate_MediaModel(MediaModel media)
        {
            var validationContext = new ValidationContext(media);

            Assert.Empty(media.Validate(validationContext));
        }