Skip to content

Commit c3a1fab

Browse files
committed
chore: additional FA replacement
Signed-off-by: Vincent Biret <[email protected]>
1 parent d841a2a commit c3a1fab

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

test/Microsoft.OpenApi.Readers.Tests/V31Tests/OpenApiSchemaTests.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System.Collections.Generic;
55
using System.IO;
6+
using System.Linq;
67
using System.Text.Json.Nodes;
78
using System.Threading.Tasks;
89
using FluentAssertions;
@@ -298,9 +299,9 @@ public void CloningSchemaWithExamplesAndEnumsShouldSucceed()
298299
clone.Default = 6;
299300

300301
// Assert
301-
clone.Enum.Should().NotBeEquivalentTo(schema.Enum);
302-
clone.Examples.Should().NotBeEquivalentTo(schema.Examples);
303-
clone.Default.Should().NotBeEquivalentTo(schema.Default);
302+
Assert.Equivalent(new int[] {1, 2, 3, 4}, clone.Enum.Select(static x => x.GetValue<int>()).ToArray());
303+
Assert.Equivalent(new int[] {2, 3, 4}, clone.Examples.Select(static x => x.GetValue<int>()).ToArray());
304+
Assert.Equivalent(6, clone.Default.GetValue<int>());
304305
}
305306

306307
[Fact]

test/Microsoft.OpenApi.Tests/Models/OpenApiMediaTypeTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Collections.Generic;
55
using System.Text.Json.Nodes;
66
using System.Threading.Tasks;
7-
using FluentAssertions;
87
using Microsoft.OpenApi.Extensions;
98
using Microsoft.OpenApi.Interfaces;
109
using Microsoft.OpenApi.Models;
@@ -440,7 +439,10 @@ public void MediaTypeCopyConstructorWorks()
440439
};
441440

442441
// Assert
443-
MediaTypeWithObjectExamples.Examples.Should().NotBeEquivalentTo(clone.Examples);
442+
Assert.Equal(42, clone.Example.GetValue<int>());
443+
Assert.Empty(clone.Examples);
444+
Assert.Empty(clone.Encoding);
445+
Assert.Empty(clone.Extensions);
444446
Assert.Null(MediaTypeWithObjectExamples.Example);
445447
}
446448
}

0 commit comments

Comments
 (0)