File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Microsoft.OpenApi.Readers.Tests/V3Tests
Microsoft.OpenApi.Tests/Services Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 10
10
using Xunit ;
11
11
using Xunit . Abstractions ;
12
12
13
- namespace Microsoft . OpenApi . Readers . Tests
13
+ namespace Microsoft . OpenApi . Readers . Tests . V3Tests
14
14
{
15
15
[ Collection ( "DefaultSettings" ) ]
16
16
public class OpenApiDocumentTests
Original file line number Diff line number Diff line change 1
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
2
// Licensed under the MIT license.
3
3
4
+ using System . Collections . Generic ;
4
5
using FluentAssertions ;
6
+ using Microsoft . OpenApi . Exceptions ;
5
7
using Microsoft . OpenApi . Models ;
6
8
using Microsoft . OpenApi . Services ;
7
9
using Xunit ;
8
10
9
- namespace Microsoft . OpenApi . Tests
11
+ namespace Microsoft . OpenApi . Tests . Services
10
12
{
11
13
[ Collection ( "DefaultSettings" ) ]
12
- public class ValidationTests
14
+ public class OpenApiValidatorTests
13
15
{
14
16
[ Fact ]
15
17
public void ResponseMustHaveADescription ( )
@@ -36,7 +38,11 @@ public void ResponseMustHaveADescription()
36
38
var walker = new OpenApiWalker ( validator ) ;
37
39
walker . Walk ( openApiDocument ) ;
38
40
39
- validator . Exceptions . Should ( ) . HaveCount ( 1 ) ;
41
+ validator . Exceptions . ShouldBeEquivalentTo (
42
+ new List < OpenApiException >
43
+ {
44
+ new OpenApiException ( "Response must have a description" )
45
+ } ) ;
40
46
}
41
47
}
42
48
}
You can’t perform that action at this time.
0 commit comments