public void SkipIsolationChecksRejectsMissingEvaluation()
        {
            var configWithoutEvaluation = new BuildRequestConfiguration();

            var exception = Assert.Throws <InternalErrorException>(
                () =>
            {
                configWithoutEvaluation.ShouldSkipIsolationConstraintsForReference(Path.GetFullPath("foo"));
            });
        }
        private void TestSkipIsolationConstraints(string glob, string referencePath, bool expectedOutput, string projectContents = null)
        {
            if (!NativeMethodsShared.IsWindows)
            {
                glob          = glob.Replace(@"c:\", "/").ToSlash();
                referencePath = referencePath.Replace(@"c:\", "/").ToSlash();
            }

            glob = $"$([MSBuild]::Escape('{glob}'))";

            projectContents ??= $@"
<Project>
    <ItemGroup>
        <{ItemTypeNames.GraphIsolationExemptReference} Include=`{glob};ShouldNotMatchAnything`/>
    </ItemGroup>
</Project>
".Cleanup();

            var projectCollection = _env.CreateProjectCollection().Collection;
            var project           = Project.FromXmlReader(
                XmlReader.Create(new StringReader(projectContents)),
                new ProjectOptions
            {
                ProjectCollection = projectCollection
            });

            project.FullPath = _env.CreateFolder().Path;

            var projectInstance = project.CreateProjectInstance();

            var configuration = new BuildRequestConfiguration(new BuildRequestData(projectInstance, new string[] {}), MSBuildConstants.CurrentToolsVersion);

            if (referencePath.Contains("$"))
            {
                referencePath = project.ExpandPropertyValueBestEffortLeaveEscaped(referencePath, ElementLocation.EmptyLocation);
            }

            configuration.ShouldSkipIsolationConstraintsForReference(referencePath).ShouldBe(expectedOutput);
        }