public void When_AbsoluteUrl_Prepends_Configuration_Base_Url() { // Arrange var link = new LinkGeneratorTestsOperation { Category = "the-category", ClientId = 726 }; // Assert linkGenerator.CreateUrl(link).Should().Be("http://api.example.com/api/aUrl/726/the-category/some-more"); }
public void When_Extra_Properties_Then_Appends_As_QueryString() { // Arrange var link = new LinkGeneratorTestsOperation { Category = "the-category", ClientId = 726, AnotherProp = "some value to escape", AndAnotherOne = 1548 }; // Assert linkGenerator.CreateUrl(link).Should().EndWith("/aUrl/726/the-category/some-more?AnotherProp=some%20value%20to%20escape&AndAnotherOne=1548"); }