Skip to content

Commit

Permalink
- adds additional test
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
  • Loading branch information
baywet committed Dec 18, 2023
1 parent 9179e22 commit 4de9bd2
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,21 @@ public void ValidatePathsAreUniqueDoesNotConsiderMultiParametersAsIdentical()
// Assert
errors.Should().BeEmpty();
}
[Fact]
public void ValidatePathsAreUniqueConsidersMultiParametersAsIdentical()
{
// Arrange
var paths = new OpenApiPaths
{
{"/drives/{drive-id}/items/{driveItem-id}/workbook/worksheets/{workbookWorksheet-id}/charts/{workbookChart-id}/image(width={width},height={height})",new OpenApiPathItem() },
{"/drives/{drive-id}/items/{driveItem-id}/workbook/worksheets/{workbookWorksheet-id}/charts/{workbookChart-id}/image(width={width},height={size})",new OpenApiPathItem() },
};

// Act
var errors = paths.Validate(ValidationRuleSet.GetDefaultRuleSet());

// Assert
errors.Should().NotBeEmpty();
}
}
}

0 comments on commit 4de9bd2

Please sign in to comment.