private static bool compare(XElement expected, ITypedElement actual) { var type = expected.Attribute("type").Value; var tp = (ITypedElement)actual; Assert.True(type == tp.InstanceType, "incorrect output type"); if (expected.IsEmpty) { return(true); // we are not checking the value } var value = expected.Value; Assert.True(value.Equals(actual.ToStringRepresentation()), "incorrect output value"); return(true); }