Skip to content

Commit dcc7b7f

Browse files
committed
Fix failing tests
1 parent ff38301 commit dcc7b7f

File tree

4 files changed

+23
-25
lines changed

4 files changed

+23
-25
lines changed

test/Microsoft.OpenApi.Tests/Validations/OpenApiHeaderValidationTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

44
using System.Collections.Generic;
@@ -109,15 +109,15 @@ public void ValidateExamplesShouldNotHaveDataTypeMismatchForSimpleSchema()
109109
warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
110110
{
111111
"type : Value is \"string\" but should be \"object\" at ",
112-
"type : Value is \"string\" but should be \"integer\" at /y",
112+
"type : Value is \"string\" but should be \"integer\" at /y",
113113
"type : Value is \"string\" but should be \"integer\" at /z",
114114
"type : Value is \"array\" but should be \"object\" at "
115115
});
116116
warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
117117
{
118-
"#/examples/example0/value",
119-
"#/examples/example1/value",
120-
"#/examples/example1/value",
118+
"#/examples/example0/value",
119+
"#/examples/example1/value",
120+
"#/examples/example1/value",
121121
"#/examples/example2/value"
122122
});
123123
}

test/Microsoft.OpenApi.Tests/Validations/OpenApiMediaTypeValidationTests.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

44
using System.Collections.Generic;
@@ -104,18 +104,16 @@ public void ValidateExamplesShouldNotHaveDataTypeMismatchForSimpleSchema()
104104
result.Should().BeFalse();
105105
warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
106106
{
107-
"type : Value is \"string\" but should be \"object\" at ",
107+
"type : Value is \"string\" but should be \"object\" at ",
108108
"type : Value is \"string\" but should be \"integer\" at /y",
109-
"type : Value is \"string\" but should be \"integer\" at /z",
109+
"type : Value is \"string\" but should be \"integer\" at /z",
110110
"type : Value is \"array\" but should be \"object\" at "
111111
});
112112
warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
113113
{
114-
// #enum/0 is not an error since the spec allows
115-
// representing an object using a string.
116114
"#/examples/example0/value",
117-
"#/examples/example1/value",
118-
"#/examples/example1/value",
115+
"#/examples/example1/value",
116+
"#/examples/example1/value",
119117
"#/examples/example2/value"
120118
});
121119
}

test/Microsoft.OpenApi.Tests/Validations/OpenApiParameterValidationTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

44
using System;
@@ -160,18 +160,18 @@ public void ValidateExamplesShouldNotHaveDataTypeMismatchForSimpleSchema()
160160
result.Should().BeFalse();
161161
warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
162162
{
163-
"type : Value is \"string\" but should be \"object\" at ",
164-
"type : Value is \"string\" but should be \"integer\" at /y",
165-
"type : Value is \"string\" but should be \"integer\" at /z",
163+
"type : Value is \"string\" but should be \"object\" at ",
164+
"type : Value is \"string\" but should be \"integer\" at /y",
165+
"type : Value is \"string\" but should be \"integer\" at /z",
166166
"type : Value is \"array\" but should be \"object\" at "
167167
});
168168
warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
169169
{
170170
// #enum/0 is not an error since the spec allows
171171
// representing an object using a string.
172-
"#/{parameter1}/examples/example0/value",
173-
"#/{parameter1}/examples/example1/value",
174-
"#/{parameter1}/examples/example1/value",
172+
"#/{parameter1}/examples/example0/value",
173+
"#/{parameter1}/examples/example1/value",
174+
"#/{parameter1}/examples/example1/value",
175175
"#/{parameter1}/examples/example2/value"
176176
});
177177
}

test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

44
using System;
@@ -116,16 +116,16 @@ public void ValidateEnumShouldNotHaveDataTypeMismatchForSimpleSchema()
116116
result.Should().BeFalse();
117117
warnings.Select(e => e.Message).Should().BeEquivalentTo(new[]
118118
{
119-
"type : Value is \"string\" but should be \"object\" at ",
120-
"type : Value is \"string\" but should be \"integer\" at /y",
121-
"type : Value is \"string\" but should be \"integer\" at /z",
119+
"type : Value is \"string\" but should be \"object\" at ",
120+
"type : Value is \"string\" but should be \"integer\" at /y",
121+
"type : Value is \"string\" but should be \"integer\" at /z",
122122
"type : Value is \"array\" but should be \"object\" at "
123123
});
124124
warnings.Select(e => e.Pointer).Should().BeEquivalentTo(new[]
125125
{
126126
"#/enum/0",
127-
"#/enum/1",
128-
"#/enum/1",
127+
"#/enum/1",
128+
"#/enum/1",
129129
"#/enum/2"
130130
});
131131
}

0 commit comments

Comments
 (0)