public void GetHost_ParseTestShouldSucceed() { // Given var endpoint = new Uri(ValidEndpoint); // When var host = RestUtilities.GetHost(endpoint); // Then host.Should().BeOneOf(ValidHost, ValidHost + "/"); }
public void GetHost_ShouldThrowIfNullGiven() { // Given Uri endpoint = null; // When var exception = Record.Exception(() => RestUtilities.GetHost(endpoint)); // Then exception.Should().BeOfType <ArgumentNullException>(); }