示例#1
0
        public void CreateSanitizedPathUri_WithNoParams()
        {
            // Action
            var actual = UriCreator.CreateSanitizedPathUri(UriKind.Absolute);

            // Assert
            Assert.IsNull(actual);
        }
示例#2
0
        public void CreateSanitizedPathUri_WithDefaultValues()
        {
            // Arrange
            var expected = new Uri("http://www.k2.com");

            // Action
            var actual = UriCreator.CreateSanitizedPathUri(UriKind.Absolute, expected.ToString());

            // Assert
            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void CreateSanitizedPathUri_WithNullPathSegments()
        {
            // Arrange
            string[] pathSegment1 = null;

            // Action
            var actual = UriCreator.CreateSanitizedPathUri(UriKind.Absolute, pathSegment1);

            // Assert
            Assert.IsNull(actual);
        }
示例#4
0
        public void CreateSanitizedPathUri_WithEmptyStringArray()
        {
            // Arrange
            var pathSegment1 = new string[] { };

            // Action
            var actual = UriCreator.CreateSanitizedPathUri(UriKind.Absolute, pathSegment1);

            // Assert
            Assert.IsNull(actual);
        }