File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
Microsoft.OpenApi.Readers.Tests Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ public class DefaultSettingsFixture
17
17
/// </summary>
18
18
public DefaultSettingsFixture ( )
19
19
{
20
+ // We need RespectingRuntimeTypes() to ensure equivalence test works property,
21
+ // given that there are multiple types that can be used for the declared type OpenApiAny.
22
+ // Without this option, properties specific to those types would not be compared.
20
23
AssertionOptions . AssertEquivalencyUsing (
21
24
o => o . AllowingInfiniteRecursion ( ) . RespectingRuntimeTypes ( ) ) ;
22
25
}
Original file line number Diff line number Diff line change 1
1
// ------------------------------------------------------------
2
2
// Copyright (c) Microsoft Corporation. All rights reserved.
3
- // Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
3
+ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
4
4
// ------------------------------------------------------------
5
5
6
6
using Xunit ;
@@ -11,7 +11,7 @@ namespace Microsoft.OpenApi.Readers.Tests
11
11
/// Collection dummy class for <see cref="DefaultSettingsFixture"/>.
12
12
/// </summary>
13
13
/// <remarks>
14
- /// This class is needed in xUnit framework to define collection name
14
+ /// This class is needed in xUnit framework to define collection name
15
15
/// to be used in unit test classes.
16
16
/// </remarks>
17
17
[ CollectionDefinition ( "DefaultSettings" ) ]
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ public class DefaultSettingsFixture
17
17
/// </summary>
18
18
public DefaultSettingsFixture ( )
19
19
{
20
+ // We need RespectingRuntimeTypes() to ensure equivalence test works property,
21
+ // given that there are multiple types that can be used for the declared type OpenApiAny.
22
+ // Without this option, properties specific to those types would not be compared.
20
23
AssertionOptions . AssertEquivalencyUsing (
21
24
o => o . AllowingInfiniteRecursion ( ) . RespectingRuntimeTypes ( ) ) ;
22
25
}
Original file line number Diff line number Diff line change 1
1
// ------------------------------------------------------------
2
2
// Copyright (c) Microsoft Corporation. All rights reserved.
3
- // Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
3
+ // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
4
4
// ------------------------------------------------------------
5
5
6
6
using Xunit ;
@@ -11,7 +11,7 @@ namespace Microsoft.OpenApi.Tests
11
11
/// Collection dummy class for <see cref="DefaultSettingsFixture"/>.
12
12
/// </summary>
13
13
/// <remarks>
14
- /// This class is needed in xUnit framework to define collection name
14
+ /// This class is needed in xUnit framework to define collection name
15
15
/// to be used in unit test classes.
16
16
/// </remarks>
17
17
[ CollectionDefinition ( "DefaultSettings" ) ]
You can’t perform that action at this time.
0 commit comments