Apply() public method

Adds a forward slash (/) to the end of the part segment of the URL, if not already present. No slash is added if the URL contains a period (.) indicating a file extension.
public Apply ( UriBuilder uri ) : void
uri System.UriBuilder The URL to be canonicalized.
return void
        public void AssertUrlChange(string originalUrl, string expectedCanonicalUrl)
        {
            var uriBuilder = new UriBuilder(originalUrl);

            IUrlStrategy strategy = new TrailingSlashStrategy();
            strategy.Apply(uriBuilder);

            Assert.That(uriBuilder.Uri, Is.EqualTo(new Uri(expectedCanonicalUrl)));
        }