public void Equivalent_SameValues()
        {
            var dr = new DatasourceRecord
            {
                DatasourceId    = 5,
                DataType        = DatasourceRecord.DataTypeEnum.Integer,
                IntervalSeconds = 6,
                Timestamp       = DateTime.Parse("2013-01-01 5:00am")
            };

            dr.SetIntValue(7);

            var dr2 = new DatasourceRecord
            {
                DatasourceId    = 5,
                DataType        = DatasourceRecord.DataTypeEnum.Integer,
                IntervalSeconds = 6,
                Timestamp       = DateTime.Parse("2013-01-01 5:00am")
            };

            dr2.SetIntValue(7);

            Assert.IsTrue(dr.Equivalent(dr2));
            Assert.IsTrue(dr2.Equivalent(dr));
        }
        public void Equivalent_BothHaveNullValue()
        {
            var dr  = new DatasourceRecord();
            var dr2 = new DatasourceRecord();

            Assert.IsTrue(dr.Equivalent(dr2));
            Assert.IsTrue(dr2.Equivalent(dr));
        }
        public void Equivalent_SourceIsNull()
        {
            var dr  = new DatasourceRecord();
            var dr2 = new DatasourceRecord();

            dr2.SetDoubleValue(5.6);

            Assert.IsFalse(dr.Equivalent(dr2));
            Assert.IsFalse(dr2.Equivalent(dr));
        }
        public void Equivalent_SameInstances()
        {
            var dr = new DatasourceRecord();

            Assert.IsTrue(dr.Equivalent(dr));
        }
        public void Equivalent_CompareWithNull_NotEquivalent()
        {
            var dr = new DatasourceRecord();

            Assert.IsFalse(dr.Equivalent(null));
        }