public void NoOutputsReportedIfNoIntermediateOutputPath() { Project project = CreateTestProject(null); ProjectInstance projectInstance = project.CreateProjectInstance(ProjectInstanceSettings.ImmutableWithFastItemLookup); var predictor = new IntermediateOutputPathIsOutputDir(); bool hasPredictions = predictor.TryPredictInputsAndOutputs(project, projectInstance, @"C:\repo", out _); Assert.False(hasPredictions, "Predictor should have fallen back to returning no predictions if IntermediateOutputDir is not defined in project"); }
public void RelativeIntermediateOutputPathFoundAsOutputDir() { const string IntermediateOutputPath = @"bin\x64"; Project project = CreateTestProject(IntermediateOutputPath); ProjectInstance projectInstance = project.CreateProjectInstance(ProjectInstanceSettings.ImmutableWithFastItemLookup); var predictor = new IntermediateOutputPathIsOutputDir(); bool hasPredictions = predictor.TryPredictInputsAndOutputs(project, projectInstance, @"C:\repo", out StaticPredictions predictions); Assert.True(hasPredictions); predictions.AssertPredictions(null, new[] { new BuildOutputDirectory(Path.Combine(Directory.GetCurrentDirectory(), IntermediateOutputPath)) }); }