Skip to content

Commit 8a611d8

Browse files
committed
Add comment to explain the fixture
1 parent 550c2b4 commit 8a611d8

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixture.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public class DefaultSettingsFixture
1717
/// </summary>
1818
public DefaultSettingsFixture()
1919
{
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.
2023
AssertionOptions.AssertEquivalencyUsing(
2124
o => o.AllowingInfiniteRecursion().RespectingRuntimeTypes());
2225
}

test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixtureCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------
22
// 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.
44
// ------------------------------------------------------------
55

66
using Xunit;
@@ -11,7 +11,7 @@ namespace Microsoft.OpenApi.Readers.Tests
1111
/// Collection dummy class for <see cref="DefaultSettingsFixture"/>.
1212
/// </summary>
1313
/// <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
1515
/// to be used in unit test classes.
1616
/// </remarks>
1717
[CollectionDefinition("DefaultSettings")]

test/Microsoft.OpenApi.Tests/DefaultSettingsFixture.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public class DefaultSettingsFixture
1717
/// </summary>
1818
public DefaultSettingsFixture()
1919
{
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.
2023
AssertionOptions.AssertEquivalencyUsing(
2124
o => o.AllowingInfiniteRecursion().RespectingRuntimeTypes());
2225
}

test/Microsoft.OpenApi.Tests/DefaultSettingsFixtureCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------
22
// 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.
44
// ------------------------------------------------------------
55

66
using Xunit;
@@ -11,7 +11,7 @@ namespace Microsoft.OpenApi.Tests
1111
/// Collection dummy class for <see cref="DefaultSettingsFixture"/>.
1212
/// </summary>
1313
/// <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
1515
/// to be used in unit test classes.
1616
/// </remarks>
1717
[CollectionDefinition("DefaultSettings")]

0 commit comments

Comments
 (0)