public void TestAddAndRetrieveResultsByConfiguration() { ResultsCache cache = new ResultsCache(); BuildRequest request = new BuildRequest(1 /* submissionId */, 0, 1, new string[1] { "testTarget" }, null, BuildEventContext.Invalid, null); BuildResult result = new BuildResult(request); result.AddResultsForTarget("testTarget", TestUtilities.GetEmptyFailingTargetResult()); cache.AddResult(result); request = new BuildRequest(1 /* submissionId */, 0, 1, new string[1] { "otherTarget" }, null, BuildEventContext.Invalid, null); result = new BuildResult(request); result.AddResultsForTarget("otherTarget", TestUtilities.GetEmptySucceedingTargetResult()); cache.AddResult(result); BuildResult retrievedResult = cache.GetResultsForConfiguration(1); Assert.True(retrievedResult.HasResultsForTarget("testTarget")); Assert.True(retrievedResult.HasResultsForTarget("otherTarget")); }