Skip to content

Commit

Permalink
Add special character tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adams85 committed Jan 9, 2024
1 parent bc417e4 commit ab4f37e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/ConfigCat.Client.Tests/BasicConfigCatClientIntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -460,4 +460,31 @@ public void Ensure_Multiple_Requests_Doesnt_Interfere_In_ValueTasks()
manualPollClient.ForceRefresh();
});
}

// https://app.configcat.com/v2/e7a75611-4256-49a5-9320-ce158755e3ba/08d5a03c-feb7-af1e-a1fa-40b3329f8bed/08dc016a-675e-4aa2-8492-6f572ad98037/244cf8b0-f604-11e8-b543-f23c917f9d8d
private const string SpecialCharactersSdkKey = "configcat-sdk-1/PKDVCLf-Hq-h-kCzMp-L7Q/u28_1qNyZ0Wz-ldYHIU7-g";

[TestMethod]
public async Task SpecialCharacters_Works_Cleartext()
{
using var client = ConfigCatClient.Get(SpecialCharactersSdkKey, options =>
{
options.PollingMode = PollingModes.LazyLoad();
});

var actual = await client.GetValueAsync("specialCharacters", "NOT_CAT", new User("äöüÄÖÜçéèñışğ⢙✓😀"));
Assert.AreEqual("äöüÄÖÜçéèñışğ⢙✓😀", actual);
}

[TestMethod]
public async Task SpecialCharacters_Works_Hashed()
{
using var client = ConfigCatClient.Get(SpecialCharactersSdkKey, options =>
{
options.PollingMode = PollingModes.LazyLoad();
});

var actual = await client.GetValueAsync("specialCharactersHashed", "NOT_CAT", new User("äöüÄÖÜçéèñışğ⢙✓😀"));
Assert.AreEqual("äöüÄÖÜçéèñışğ⢙✓😀", actual);
}
}

0 comments on commit ab4f37e

Please sign in to comment.