Пример #1
0
        /// <inheritdoc/>
        public override bool Equals(object other)
        {
            if (!(other is TagContextBase))
            {
                return(false);
            }

            TagContextBase otherTags = (TagContextBase)other;

            var t1Enumerator = this.GetEnumerator();
            var t2Enumerator = otherTags.GetEnumerator();

            List <ITag> tags1 = null;
            List <ITag> tags2 = null;

            if (t1Enumerator == null)
            {
                tags1 = new List <ITag>();
            }
            else
            {
                tags1 = this.ToList();
            }

            if (t2Enumerator == null)
            {
                tags2 = new List <ITag>();
            }
            else
            {
                tags2 = otherTags.ToList();
            }

            return(Collections.AreEquivalent(tags1, tags2));
        }
Пример #2
0
        private static void AssertContains(IList <IMeasurement> metrics, params IMeasurement[] measurements)
        {
            var expected = measurements.ToList();

            Assert.True(Collections.AreEquivalent(metrics, expected));
        }