public void Clone() { BuildRequest request = CreateNewBuildRequest(1, new string[0]); BuildResult result1 = new BuildResult(request); result1.ResultsByTarget.Add("FOO", BuildResultUtilities.GetEmptySucceedingTargetResult()); Assert.True(result1.ResultsByTarget.ContainsKey("foo")); // test comparer BuildResult result2 = result1.Clone(); result1.ResultsByTarget.Add("BAR", BuildResultUtilities.GetEmptySucceedingTargetResult()); Assert.True(result1.ResultsByTarget.ContainsKey("foo")); // test comparer Assert.True(result1.ResultsByTarget.ContainsKey("bar")); Assert.Equal(result1.SubmissionId, result2.SubmissionId); Assert.Equal(result1.ConfigurationId, result2.ConfigurationId); Assert.Equal(result1.GlobalRequestId, result2.GlobalRequestId); Assert.Equal(result1.ParentGlobalRequestId, result2.ParentGlobalRequestId); Assert.Equal(result1.NodeRequestId, result2.NodeRequestId); Assert.Equal(result1.CircularDependency, result2.CircularDependency); Assert.Equal(result1.ResultsByTarget["foo"], result2.ResultsByTarget["foo"]); Assert.Equal(result1.OverallResult, result2.OverallResult); }