public void ObfuscateUrlQueryDefault_ReturnsNotObfuscatedWhenQueryIsEmpty() { //Arrange Uri data = new Uri("https://localhost:550/users/account"); // Act var obfuscated = RouteExtensions.ObfuscateUrlQuery(data, RouteExtensions.ObfuscatedReturnUrlMetadata); //Assert Assert.Equal(data.ToString(), obfuscated.ToString()); }
public void ObfuscateUrlQuery_ReturnsObfuscatedUriWhenObfuscated(string input, string expected) { //Arrange Uri data = new Uri(input); // Act var obfuscated = RouteExtensions.ObfuscateUrlQuery(data, RouteExtensions.ObfuscatedReturnUrlMetadata); //Assert Assert.Equal(expected, obfuscated.ToString()); }
public void ObfuscateUrlQueryDefault_ThrowWhenMetadataIsNull() { //Act + Assert Assert.Throws <ArgumentNullException>(() => RouteExtensions.ObfuscateUrlQuery(new Uri("https://localhost:550/users/account"), null)); }
public void ObfuscateUrlQueryDefault_ThrowWhenUriNull() { //Act + Assert Assert.Throws <ArgumentNullException>(() => RouteExtensions.ObfuscateUrlQuery(null, RouteExtensions.ObfuscatedReturnUrlMetadata)); }