public void UriUtils_TryCreateAbsoluteUrl(string url, bool isAbsolute) { var isActuallyAbsolute = UriUtils.TryCreateAbsoluteUrl(url, out Uri result); isActuallyAbsolute.Should().Be(isAbsolute); if (isAbsolute) { result.AbsoluteUri.Should().StartWith(url); } else { result.Should().BeNull(); } }