Example #1
0
 private void ValidatePackageUri(string packageUri, UriKind allowedUriKind)
 {
     if (!_galleryUriValidator.IsValidUri(packageUri, allowedUriKind))
     {
         throw new UriFormatException(packageUri);
     }
 }
Example #2
0
        public void ShouldOnlyAllowRelativeOrAbsoluteUrisThatAreHttpOrHttpsUris(string uri, bool expectedResult)
        {
            bool isValidUri = _validator.IsValidUri(uri);

            Assert.AreEqual(expectedResult, isValidUri);
        }