private void AssertOnlyChange(ClassDetail cd, string declaration, ChangeType changeType) { bool found = false; foreach (ICanAlign child in cd.Children) { if (child is MethodDetail) { MethodDetail method = (MethodDetail)child; if ((method.GetTextDeclaration() == declaration) || (((MethodDetail)method.NavigateBackward).GetTextDeclaration() == declaration)) { Assert.AreEqual(changeType, method.Change); found = true; } else { Assert.AreEqual(ChangeType.None, method.Change); } } } Assert.IsTrue(found, string.Format("Method '{0}' was not found in {1}", declaration, cd.Name)); }