Skip to content

Commit 3125b32

Browse files
committed
fix ios test
1 parent 2201556 commit 3125b32

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- C# 12.0
66
- android 14 (api 34)
77
- xcode 15.0 (ios 17.0)
8+
- fix ios test
89
- Microsoft.Extensions.Logging.Abstractions 8.0.0
910
- Square.OkHttp3 4.11.0.3
1011
- Square.OkHttp3.UrlConnection 4.11.0.3

SecureHttpClient.Test/HttpTest.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@ public async Task HttpTest_Headers()
6161
var result = await SendAsync(req).ReceiveString();
6262
var json = JsonDocument.Parse(result);
6363
var headers = json.RootElement.GetProperty("headers").Deserialize<Dictionary<string, string>>().Select(kv => kv.Key).ToList();
64-
var index1 = headers.IndexOf("header1");
65-
var index2 = headers.IndexOf("header2");
66-
var index3 = headers.IndexOf("header3");
67-
Assert.Equal(1, index2 - index1);
68-
Assert.Equal(1, index3 - index2);
64+
Assert.Contains("header1", headers);
65+
Assert.Contains("header2", headers);
66+
Assert.Contains("header3", headers);
6967
}
7068

7169
[SkippableFact]

SecureHttpClient.TestRunner.Maui/SecureHttpClient.TestRunner.Maui.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
<AndroidStripILAfterAOT>true</AndroidStripILAfterAOT>
4242
</PropertyGroup>
4343

44+
<PropertyGroup Condition="'$(Configuration)|$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))'=='Debug|ios'">
45+
<MtouchDebug>True</MtouchDebug>
46+
</PropertyGroup>
47+
4448
<ItemGroup Condition="'$(Configuration)|$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))'=='Release|android'">
4549
<TrimmerRootAssembly Include="SecureHttpClient.Test" RootMode="All" />
4650
<TrimmerRootAssembly Include="xunit.core" RootMode="All" />

0 commit comments

Comments
 (0)