Beispiel #1
0
        public void FindAllWrongWhenAllAreWrong()
        {
            var results = FindSiblingsThatAreMissingStructural.Equality <AnotherClass>();

            var friendlyResults = results.Select(t => t.ToString()).OrderBy(t => t);

            Approvals.VerifyAll(friendlyResults, "Bad Equality");
        }
Beispiel #2
0
        public void IgnoreAllIgnoredTypes()
        {
            var ignoreThese = new[] { typeof(DynamicProperty) };

            var result = FindSiblingsThatAreMissingStructural.Equality <ReferenceGoodClass>(ignoreThese);

            Assert.Empty(result);
        }
Beispiel #3
0
        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");
        }
Beispiel #4
0
        public void NotFindAnythingIfAllAreCorrect()
        {
            var results = FindSiblingsThatAreMissingStructural.Equality <HasSimpleArrays>();

            Assert.Empty(results);
        }