Пример #1
0
        public void Combine_WithHostNull_ThrowsException()
        {
            Exception exception = Record.Exception(() => UriTools.Combine(null, "path.html"));

            Assert.IsType <ArgumentNullException>(exception);
        }
Пример #2
0
        public void Combine_WithValidInput_ReturnsCombinedUri(string host, string path, string expected)
        {
            Uri result = UriTools.Combine(host, path);

            Assert.Equal(expected, result.OriginalString);
        }
Пример #3
0
        public void GetRandomResourceUrl_WithScheme_ReturnsResourceUrl()
        {
            string result = UriTools.GetRandomResourceUrl("somescheme");

            Assert.Matches(@"somescheme://resources\.[0-9a-z]{8}\.internal", result);
        }
Пример #4
0
        public void Combine_WithPathNull_ThrowsException()
        {
            Exception exception = Record.Exception(() => UriTools.Combine("http://foo.bar", null));

            Assert.IsType <ArgumentNullException>(exception);
        }