Ejemplo n.º 1
0
        public static void EqualsT_GivenNullIAutoIncrement_ReturnsFalse()
        {
            const int initialValue = 12345;
            const int increment    = 9876;
            var       a            = new AutoIncrement(initialValue, increment);

            Assert.That(a.Equals(null), Is.False);
        }
Ejemplo n.º 2
0
        public static void Equals_GivenObjectsWithDifferentInitialValue_ReturnsFalse()
        {
            const int initialValue = 12345;
            const int increment    = 9876;
            var       a            = new AutoIncrement(initialValue, increment);
            object    b            = new AutoIncrement(54321, increment);

            Assert.That(a.Equals(b), Is.False);
        }
Ejemplo n.º 3
0
        public static void Equals_GivenObjectsWithEqualInputs_ReturnsTrue()
        {
            const int initialValue = 12345;
            const int increment    = 9876;
            var       a            = new AutoIncrement(initialValue, increment);
            object    b            = new AutoIncrement(initialValue, increment);

            Assert.That(a.Equals(b), Is.True);
        }
Ejemplo n.º 4
0
        public static void Equals_GivenNonAutoIncrementObject_ReturnsFalse()
        {
            const int initialValue = 12345;
            const int increment    = 9876;
            var       a            = new AutoIncrement(initialValue, increment);
            var       b            = new object();

            Assert.That(a.Equals(b), Is.False);
        }