Example #1
0
        public void MimeTypeWithValidTopLevelIsValid()
        {
            var resource = new Resource();

            resource.MimeType = "image/jpeg";

            var mimeTypeValidator = new MimeTypeValidator(resource);

            Assert.True(mimeTypeValidator.IsValid);
        }
Example #2
0
        public void MimeTypeWithInvalidTopLevelIsInvalid()
        {
            var resource = new Resource();

            resource.MimeType = "invalidMimeType";

            var mimeTypeValidator = new MimeTypeValidator(resource);

            Assert.False(mimeTypeValidator.IsValid);
        }