private void AssertVersion3(ApiDescriptionGroup group) { const string GroupName = "v3"; group.GroupName.Should().Be(GroupName); group.Items.Should().BeEquivalentTo( new[] { new { HttpMethod = "GET", GroupName, RelativePath = "api/GetSalesTaxRate(PostalCode={postalCode})" }, new { HttpMethod = "GET", GroupName, RelativePath = "api/Orders" }, new { HttpMethod = "GET", GroupName, RelativePath = "api/Orders({key})" }, new { HttpMethod = "POST", GroupName, RelativePath = "api/Orders" }, new { HttpMethod = "PATCH", GroupName, RelativePath = "api/Orders({key})" }, new { HttpMethod = "DELETE", GroupName, RelativePath = "api/Orders({key})?suspendOnly={suspendOnly}" }, new { HttpMethod = "GET", GroupName, RelativePath = "api/Orders/MostExpensive" }, new { HttpMethod = "POST", GroupName, RelativePath = "api/Orders({key})/Rate" }, new { HttpMethod = "GET", GroupName, RelativePath = "api/People" }, new { HttpMethod = "GET", GroupName, RelativePath = "api/People({key})" }, new { HttpMethod = "POST", GroupName, RelativePath = "api/People" }, new { HttpMethod = "GET", GroupName, RelativePath = "api/People/NewHires(Since={since})" }, new { HttpMethod = "POST", GroupName, RelativePath = "api/People({key})/Promote" }, }, options => options.ExcludingMissingMembers()); }
private void AssertVersion0_9(ApiDescriptionGroup group) { const string GroupName = "v0.9"; group.GroupName.Should().Be(GroupName); group.Items.Should().BeEquivalentTo( new[] { new { HttpMethod = "GET", GroupName, RelativePath = "api/GetSalesTaxRate(PostalCode={postalCode})" }, new { HttpMethod = "GET", GroupName, RelativePath = "api/Orders({key})" }, new { HttpMethod = "GET", GroupName, RelativePath = "api/People({key})" }, }, options => options.ExcludingMissingMembers()); }