Skip to content

Commit 8012fb9

Browse files
committed
- adds checks in existing unit tests for path item descriptions
Signed-off-by: Vincent Biret <[email protected]>
1 parent 4df2dc3 commit 8012fb9

8 files changed

+8
-0
lines changed

test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntityPathItemHandlerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public void CreateEntityPathItemReturnsCorrectPathItemWithReferences()
9999
Assert.Equal(3, pathItem.Operations.Count);
100100
Assert.Equal(new OperationType[] { OperationType.Get, OperationType.Patch, OperationType.Delete },
101101
pathItem.Operations.Select(o => o.Key));
102+
Assert.NotEmpty(pathItem.Description);
102103
}
103104

104105
[Theory]

test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/EntitySetPathItemHandlerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public void CreateEntitySetPathItemReturnsCorrectPathItem()
7777
Assert.Equal(2, pathItem.Operations.Count);
7878
Assert.Equal(new OperationType[] { OperationType.Get, OperationType.Post },
7979
pathItem.Operations.Select(o => o.Key));
80+
Assert.NotEmpty(pathItem.Description);
8081
}
8182

8283
[Theory]

test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/MediaEntityPathItemHandlerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public void CreateMediaEntityPathItemReturnsCorrectItem()
9494
pathItem.Operations.Select(o => o.Key));
9595
Assert.Equal(new OperationType[] { OperationType.Get, OperationType.Put },
9696
pathItem2.Operations.Select(o => o.Key));
97+
Assert.NotEmpty(pathItem.Description);
9798
}
9899

99100
[Theory]

test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/NavigationPropertyPathItemHandlerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public void CreateCollectionNavigationPropertyPathItemReturnsCorrectPathItem(boo
9292
Assert.NotNull(pathItem.Operations);
9393
Assert.NotEmpty(pathItem.Operations);
9494
Assert.Equal(expected, pathItem.Operations.Select(o => o.Key));
95+
Assert.NotEmpty(pathItem.Description);
9596
}
9697

9798
[Theory]

test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationImportPathItemHandlerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public void CreatePathItemForOperationImportReturnsCorrectPathItem(string operat
7878
var operationKeyValue = Assert.Single(pathItem.Operations);
7979
Assert.Equal(operationType, operationKeyValue.Key);
8080
Assert.NotNull(operationKeyValue.Value);
81+
Assert.NotEmpty(pathItem.Description);
8182
}
8283

8384
[Theory]

test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/OperationPathItemHandlerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public void CreatePathItemForOperationReturnsCorrectPathItem(string operationNam
8282
Assert.NotNull(operationKeyValue.Value);
8383

8484
Assert.Equal(expectSummary, operationKeyValue.Value.Summary);
85+
Assert.NotEmpty(pathItem.Description);
8586
}
8687
}
8788
}

test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/RefPathItemHandlerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public void CreateNavigationPropertyRefPathItemReturnsCorrectPathItem(bool colle
101101
Assert.NotNull(pathItem.Operations);
102102
Assert.NotEmpty(pathItem.Operations);
103103
Assert.Equal(expected, pathItem.Operations.Select(o => o.Key));
104+
Assert.NotEmpty(pathItem.Description);
104105
}
105106

106107
public static IEdmModel GetEdmModel(string annotation)

test/Microsoft.OpenAPI.OData.Reader.Tests/PathItem/SingletonPathItemHandlerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public void CreateSingletonPathItemReturnsCorrectPathItem()
7777
Assert.Equal(2, pathItem.Operations.Count);
7878
Assert.Equal(new OperationType[] { OperationType.Get, OperationType.Patch },
7979
pathItem.Operations.Select(o => o.Key));
80+
Assert.NotEmpty(pathItem.Description);
8081
}
8182

8283
[Theory]

0 commit comments

Comments
 (0)