public void TestInputChangesTriggerGraphCacheMiss(BuildDefinition buildDefinition) { using (var tempFiles = new TempFileStorage(canGetFileNames: true, rootPath: TestOutputDirectory)) { var appDeployment = CreateAppDeployment(tempFiles); // The same testRootDirectory is used for all invocations, so the spec cache can be reused. var testRoot = tempFiles.GetUniqueDirectory(PathTable).ToString(PathTable); // run once to begin with and assert cache miss RunAndAssertGraphCacheMiss(WriteSpecs(testRoot, buildDefinition), appDeployment); // for each spec foreach (var specTuple in buildDefinition.Specs) { // run again without changing anything and assert graph cache hit RunAndAssertGraphCacheHit(WriteSpecs(testRoot, buildDefinition), appDeployment); // change selected spec and assert graph cache miss buildDefinition.AppendToSpecContent(specPath: specTuple.SpecPath, contentToAppend: " "); RunAndAssertGraphCacheMiss(WriteSpecs(testRoot, buildDefinition), appDeployment); } } }