public void UsesAbsoluteLinkIfProvided(string value, bool includeHost, string expected) { // Given TestExecutionContext context = new TestExecutionContext(); context.Settings[Keys.Host] = "domain.com"; TestMetadata metadata = new TestMetadata { { "Path", value } }; metadata.AddTypeConversion <string, FilePath>(x => new FilePath(x)); // When string result = context.GetLink(metadata, "Path", includeHost); // Then result.ShouldBe(expected); }