public void ParsesEmptyQueryString() { // Arrange OcrClient client = new OcrClient(API_KEY, REGION); // Act string parsedString = client.ParseQueryString(); // Assert Assert.NotNull(parsedString); Assert.Equal(string.Empty, parsedString); }
public void ParsesQueryString() { // Arrange Dictionary <string, string> parameters = new Dictionary <string, string> { { "parameter1", "parameter1value" }, { "parameter2", "Parameter2ValueWithCapitals" }, { "parameter3", "parameter3valuewithspecialcharacters@&#να" } }; OcrClient client = new OcrClient(API_KEY, REGION); foreach (var parameter in parameters) { client.QueryStringValues.Add(parameter.Key, parameter.Value); } // Act string parsedString = client.ParseQueryString(); // Assert Assert.NotNull(parsedString); Assert.Equal("?parameter1=parameter1value¶meter2=Parameter2ValueWithCapitals¶meter3=parameter3valuewithspecialcharacters%40%26%23%C5%A1%C3%AD%C3%A1", parsedString); }