Skip to content

Commit e8733c0

Browse files
committed
make differentiating changes to test data.
1 parent bce9abd commit e8733c0

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/Microsoft.OpenApi.OData.Reader/Operation/EntityDeleteOperationHandler.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ protected override void SetBasicInfo(OpenApiOperation operation)
4040
{
4141
IEdmEntityType entityType = EntitySet.EntityType();
4242

43-
// Use Short Description as Summary
44-
// Use Long Description as Description
43+
// Description
4544
var placeHolder = "Delete entity from " + EntitySet.Name;
4645
operation.Summary = DeleteRestrictions?.Description ?? placeHolder;
4746
operation.Description = DeleteRestrictions?.LongDescription ?? placeHolder;

test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EntitySetPostOperationHandlerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private void VerifyEntitySetPostOperation(string annotation, bool enableOperatio
5858

5959
// Assert
6060
Assert.NotNull(post);
61-
Assert.Equal("Create a new customer.", post.Summary);
61+
Assert.Equal("Create customer.", post.Summary);
6262
Assert.Equal("Create a new customer.", post.Description);
6363
Assert.NotNull(post.Tags);
6464
var tag = Assert.Single(post.Tags);
@@ -247,7 +247,7 @@ internal static IEdmModel GetEdmModel(string annotation, bool hasStream = false)
247247
<Property Name=""AlternativeAddresses"" Type=""Collection(NS.Address)"" Nullable=""false"">
248248
<Annotation Term=""Org.OData.Capabilities.V1.InsertRestrictions"">
249249
<Record>
250-
<PropertyValue Property=""Description"" String=""Create a new AlternativeAddress."" />
250+
<PropertyValue Property=""Description"" String=""Create AlternativeAddress."" />
251251
<PropertyValue Property=""LongDescription"" String=""Create a new AlternativeAddress."" />
252252
</Record>
253253
</Annotation>
@@ -265,7 +265,7 @@ internal static IEdmModel GetEdmModel(string annotation, bool hasStream = false)
265265
<Annotations Target=""NS.Default/Customers"">
266266
<Annotation Term=""Org.OData.Capabilities.V1.InsertRestrictions"">
267267
<Record>
268-
<PropertyValue Property=""Description"" String=""Create a new customer."" />
268+
<PropertyValue Property=""Description"" String=""Create customer."" />
269269
<PropertyValue Property=""LongDescription"" String=""Create a new customer."" />
270270
</Record>
271271
</Annotation>

test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/SingletonGetOperationHandlerTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public void CreateSingletonGetOperationReturnsCorrectOperation(bool enableOperat
3030
string annotation = @"
3131
<Annotation Term=""Org.OData.Capabilities.V1.ReadRestrictions"">
3232
<Record>
33-
<PropertyValue Property=""Description"" String=""Get the signed-in user."" />
34-
<PropertyValue Property=""LongDescription"" String=""Get the signed-in user."" />
33+
<PropertyValue Property=""Description"" String=""List users."" />
34+
<PropertyValue Property=""LongDescription"" String=""Retrieve a list of user objects."" />
3535
</Record>
3636
</Annotation>";
3737
IEdmModel model = GetEdmModel(annotation);
@@ -48,8 +48,8 @@ public void CreateSingletonGetOperationReturnsCorrectOperation(bool enableOperat
4848

4949
// Assert
5050
Assert.NotNull(get);
51-
Assert.Equal("Get the signed-in user.", get.Summary);
52-
Assert.Equal("Get the signed-in user.", get.Description);
51+
Assert.Equal("List users.", get.Summary);
52+
Assert.Equal("Retrieve a list of user objects.", get.Description);
5353
Assert.NotNull(get.Tags);
5454
var tag = Assert.Single(get.Tags);
5555
Assert.Equal("Me.Customer", tag.Name);

0 commit comments

Comments
 (0)