コード例 #1
0
        public void DictionaryWithValues_TwoEmtpyDictionaries()
        {
            var a = new Dictionary <string, int>();
            var b = new Dictionary <string, int>();

            Assert.IsTrue(EqualityUtils.Equals(a, b));
        }
コード例 #2
0
        private bool Equals(ScopedNameResolver other)
        {
            var isTypeMapEq = EqualityUtils.Equals(_typeToQuery, other._typeToQuery);
            var isIdMapEq   = EqualityUtils.Equals(_idToQuery, other._idToQuery);

            return(Equals(ParentResolver, other.ParentResolver) && isTypeMapEq && isIdMapEq);
        }
コード例 #3
0
 protected bool Equals(InteractionStatistics other)
 {
     return(DayFirst.Equals(other.DayFirst) && DayLast.Equals(other.DayLast) && NumDays == other.NumDays &&
            NumMonth == other.NumMonth && NumEventsTotal == other.NumEventsTotal &&
            EqualityUtils.Equals(NumEventsDetailed, other.NumEventsDetailed) && Education == other.Education &&
            Position == other.Position && NumCodeCompletion == other.NumCodeCompletion &&
            NumTestRuns == other.NumTestRuns && ActiveTime.Equals(other.ActiveTime));
 }
コード例 #4
0
        public void DictionaryWithValues_NonEmtpyDictionaryB()
        {
            var a = new Dictionary <string, int>();
            var b = new Dictionary <string, int> {
                { "a", 1 }
            };

            Assert.IsFalse(EqualityUtils.Equals(a, b));
        }
コード例 #5
0
        public void DictionaryWithValues_SameKeysDiffValues()
        {
            var a = new Dictionary <string, int> {
                { "a", 1 }
            };
            var b = new Dictionary <string, int> {
                { "a", 2 }
            };

            Assert.IsFalse(EqualityUtils.Equals(a, b));
        }
コード例 #6
0
        public void DictionaryWithValues_NonEmptyNonOverlappingDictionaries()
        {
            var a = new Dictionary <string, int> {
                { "a", 1 }
            };
            var b = new Dictionary <string, int> {
                { "b", 1 }
            };

            Assert.IsFalse(EqualityUtils.Equals(a, b));
        }
コード例 #7
0
        private bool Equals(FifoCache <TKey, TValue> other)
        {
            var areValuesEqual = EqualityUtils.Equals(_values, other._values);

            return(_maxCacheSize == other._maxCacheSize && areValuesEqual);
        }