Exemple #1
0
        public void Equality()
        {
            var control = new Timestamp(1, 2);
            var equal   = new[] { new Timestamp(1, 2) };
            var unequal = new[] { new Timestamp(2, 2), new Timestamp(1, 3) };

            EqualityTester.AssertEqual(control, equal, unequal);
            EqualityTester.AssertEqualityOperators(control, equal, unequal);
        }
        public void Equality()
        {
            var control = Blob.CopyFrom(new byte[] { 1, 2, 3, 4, 5 });
            var equal   = new[] { Blob.CopyFrom(new byte[] { 1, 2, 3, 4, 5 }) };
            var unequal = new[] { Blob.CopyFrom(new byte[] { 1, 2, 3, 4, 5, 6 }) };

            EqualityTester.AssertEqual(control, equal, unequal);
            EqualityTester.AssertEqualityOperators(control, equal, unequal);
        }
        public void Equality()
        {
            var control = new GeoPoint(1.5, 2.5);
            // Equal
            var equal   = new[] { new GeoPoint(1.5, 2.5) };
            var unequal = new[]
            {
                new GeoPoint(2.5, 2.5), // Difference in latitude
                new GeoPoint(1.5, 3.5)  // Difference in longitude
            };

            EqualityTester.AssertEqual(control, equal, unequal);
            EqualityTester.AssertEqualityOperators(control, equal, unequal);
        }