Skip to content

Commit b0c4b92

Browse files
authored
Move OpenApiValidatorTests to the right location (#131)
1 parent dd23ac4 commit b0c4b92

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
using Xunit;
1111
using Xunit.Abstractions;
1212

13-
namespace Microsoft.OpenApi.Readers.Tests
13+
namespace Microsoft.OpenApi.Readers.Tests.V3Tests
1414
{
1515
[Collection("DefaultSettings")]
1616
public class OpenApiDocumentTests

test/Microsoft.OpenApi.Tests/ValidationTests.cs renamed to test/Microsoft.OpenApi.Tests/Services/OpenApiValidatorTests.cs

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

4+
using System.Collections.Generic;
45
using FluentAssertions;
6+
using Microsoft.OpenApi.Exceptions;
57
using Microsoft.OpenApi.Models;
68
using Microsoft.OpenApi.Services;
79
using Xunit;
810

9-
namespace Microsoft.OpenApi.Tests
11+
namespace Microsoft.OpenApi.Tests.Services
1012
{
1113
[Collection("DefaultSettings")]
12-
public class ValidationTests
14+
public class OpenApiValidatorTests
1315
{
1416
[Fact]
1517
public void ResponseMustHaveADescription()
@@ -36,7 +38,11 @@ public void ResponseMustHaveADescription()
3638
var walker = new OpenApiWalker(validator);
3739
walker.Walk(openApiDocument);
3840

39-
validator.Exceptions.Should().HaveCount(1);
41+
validator.Exceptions.ShouldBeEquivalentTo(
42+
new List<OpenApiException>
43+
{
44+
new OpenApiException("Response must have a description")
45+
});
4046
}
4147
}
4248
}

0 commit comments

Comments
 (0)