示例#1
0
        private bool TheseContractsMatch(IContract real, IContract mock)
        {
            bool bMatch = true;

            foreach (var prop in ContractProperties)
            {
                bMatch = ObjectEvaluator.IsEqual(prop, prop.GetValue(real, null), prop.GetValue(mock, null));

                Debug.WriteLine($"Contracts: Property:{prop.Name}, Result: {bMatch}");
            }

            return(bMatch);
        }
示例#2
0
        private bool TheseMetaMappingsMatch(IMetaMapping real, IMetaMapping mock)
        {
            bool bMatch = true;

            foreach (var prop in MetaProperties)
            {
                object oReal = prop.GetValue(real, null);

                object oMeta = prop.GetValue(mock, null);

                if (oReal == null && oMeta != null || oReal != null && oMeta == null)
                {
                    Debugger.Break();
                }

                bMatch = ObjectEvaluator.IsEqual(prop, prop.GetValue(real, null), prop.GetValue(mock, null));

                Debug.WriteLine($"Mappings: Property:{prop.Name}, Result: {bMatch}");
            }

            return(bMatch);
        }