public void ToString_FullUsage_ExpectedOutput() { // arrange var builder = new ResourceBuilder() .WithScheme(Scheme.Http) .WithHost("www.google.com") .WithPort(1234) .WithSegmentPair("FirstName", "Jon") .WithSegmentPair("LastName", "Snow") .WithQueryParameters(new { Location = "Castle Black", Position = "Lord Commander" }); // act var result = builder.BuildUri(); // assert Assert.Equal("http://www.google.com:1234/FirstName/Jon/LastName/Snow?Location=Castle+Black&Position=Lord+Commander", result.ToString()); }