Esempio n. 1
0
        public void Should_NotBeEqual_WhenCustomMetricEqualsSessionMetric()
        {
            var     sessionMetric      = new SessionMetric(NodeMetric.Counters.AuthenticationErrors.Name);
            IMetric sessionMetricBase  = sessionMetric;
            IMetric sessionMetricBase2 = sessionMetric;

            var testMetric = new TestMetric {
                Name = NodeMetric.Counters.AuthenticationErrors.Name
            };
            IMetric testMetricBase  = testMetric;
            IMetric testMetricBase2 = testMetric;

            Assert.IsFalse(testMetric.Equals(sessionMetric));
            Assert.IsFalse(sessionMetric.Equals(testMetric));

            Assert.IsFalse(testMetric.Equals(sessionMetricBase));
            Assert.IsFalse(sessionMetricBase.Equals(testMetric));

            Assert.IsFalse(testMetric.Equals(sessionMetricBase2));
            Assert.IsFalse(sessionMetricBase2.Equals(testMetric));

            Assert.IsFalse(testMetricBase.Equals(sessionMetric));
            Assert.IsFalse(sessionMetric.Equals(testMetricBase));

            Assert.IsFalse(testMetricBase.Equals(sessionMetricBase));
            Assert.IsFalse(sessionMetricBase.Equals(testMetricBase));

            Assert.IsFalse(testMetricBase.Equals(sessionMetricBase2));
            Assert.IsFalse(sessionMetricBase2.Equals(testMetricBase));

            Assert.IsFalse(testMetricBase2.Equals(sessionMetric));
            Assert.IsFalse(sessionMetric.Equals(testMetricBase2));

            Assert.IsFalse(testMetricBase2.Equals(sessionMetricBase));
            Assert.IsFalse(sessionMetricBase.Equals(testMetricBase2));

            Assert.IsFalse(testMetricBase2.Equals(sessionMetricBase2));
            Assert.IsFalse(sessionMetricBase2.Equals(testMetricBase2));
        }
Esempio n. 2
0
        public void Should_NotBeEqual_WhenNodeMetricEqualsSessionMetric()
        {
            var     sessionMetric      = new SessionMetric(NodeMetric.Counters.AuthenticationErrors.Name);
            IMetric sessionMetricBase  = sessionMetric;
            IMetric sessionMetricBase2 = sessionMetric;

            var     nodeMetric      = NodeMetric.Counters.AuthenticationErrors;
            IMetric nodeMetricBase  = nodeMetric;
            IMetric nodeMetricBase2 = nodeMetric;

            Assert.IsFalse(nodeMetric.Equals(sessionMetric));
            Assert.IsFalse(sessionMetric.Equals(nodeMetric));

            Assert.IsFalse(nodeMetric.Equals(sessionMetricBase));
            Assert.IsFalse(sessionMetricBase.Equals(nodeMetric));

            Assert.IsFalse(nodeMetric.Equals(sessionMetricBase2));
            Assert.IsFalse(sessionMetricBase2.Equals(nodeMetric));

            Assert.IsFalse(nodeMetricBase.Equals(sessionMetric));
            Assert.IsFalse(sessionMetric.Equals(nodeMetricBase));

            Assert.IsFalse(nodeMetricBase.Equals(sessionMetricBase));
            Assert.IsFalse(sessionMetricBase.Equals(nodeMetricBase));

            Assert.IsFalse(nodeMetricBase.Equals(sessionMetricBase2));
            Assert.IsFalse(sessionMetricBase2.Equals(nodeMetricBase));

            Assert.IsFalse(nodeMetricBase2.Equals(sessionMetric));
            Assert.IsFalse(sessionMetric.Equals(nodeMetricBase2));

            Assert.IsFalse(nodeMetricBase2.Equals(sessionMetricBase));
            Assert.IsFalse(sessionMetricBase.Equals(nodeMetricBase2));

            Assert.IsFalse(nodeMetricBase2.Equals(sessionMetricBase2));
            Assert.IsFalse(sessionMetricBase2.Equals(nodeMetricBase2));
        }