Exemplo n.º 1
0
        public void GetHost_ParseTestShouldSucceed()
        {
            // Given
            var endpoint = new Uri(ValidEndpoint);

            // When
            var host = RestUtilities.GetHost(endpoint);

            // Then
            host.Should().BeOneOf(ValidHost, ValidHost + "/");
        }
Exemplo n.º 2
0
        public void GetHost_ShouldThrowIfNullGiven()
        {
            // Given
            Uri endpoint = null;

            // When
            var exception = Record.Exception(() => RestUtilities.GetHost(endpoint));

            // Then
            exception.Should().BeOfType <ArgumentNullException>();
        }