public void FindAllWrongWhenAllAreWrong() { var results = FindSiblingsThatAreMissingStructural.Equality <AnotherClass>(); var friendlyResults = results.Select(t => t.ToString()).OrderBy(t => t); Approvals.VerifyAll(friendlyResults, "Bad Equality"); }
public void IgnoreAllIgnoredTypes() { var ignoreThese = new[] { typeof(DynamicProperty) }; var result = FindSiblingsThatAreMissingStructural.Equality <ReferenceGoodClass>(ignoreThese); Assert.Empty(result); }
public void OnlyReportFailingTypesIfMixed() { var ctors = new Dictionary <Type, Func <object> > { { typeof(NonDefaultConstructor), () => new NonDefaultConstructor(44) } }; var results = FindSiblingsThatAreMissingStructural.Equality <BadEqualityClass>(null, ctors); var friendlyResults = results.Select(t => t.ToString()).OrderBy(t => t); Approvals.VerifyAll(friendlyResults, "Bad Equality"); }
public void NotFindAnythingIfAllAreCorrect() { var results = FindSiblingsThatAreMissingStructural.Equality <HasSimpleArrays>(); Assert.Empty(results); }