-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathEncodingTests.cs
More file actions
26 lines (19 loc) · 726 Bytes
/
EncodingTests.cs
File metadata and controls
26 lines (19 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using GenHTTP.Modules.IO;
using GenHTTP.Modules.Layouting;
namespace GenHTTP.Testing.Acceptance.Engine;
[TestClass]
public sealed class EncodingTests
{
/// <summary>
/// As a developer, I want UTF-8 to be my default encoding.
/// </summary>
[TestMethod]
[MultiEngineTest]
public async Task TestUtf8DefaultEncoding(TestEngine engine)
{
var layout = Layout.Create().Add("utf8", Content.From(Resource.FromString("From GenHTTP with ❤")));
await using var runner = await TestHost.RunAsync(layout, engine: engine);
using var response = await runner.GetResponseAsync("/utf8");
Assert.AreEqual("From GenHTTP with ❤", await response.GetContentAsync());
}
}