Пример #1
0
        public void GeneratedErrorMessage()
        {
            int actual = 10;
            int expected = 15;

            // Assert
            var comparer = new MyEqualityComparer();
            Assert.That(actual, Is.EqualTo(expected).Using(comparer));
        }
Пример #2
0
        public void CustomMessage()
        {
            int actual = 10;
            int expected = 15;

            // Assert
            var comparer = new MyEqualityComparer();
            Assert.That(actual, Is.EqualTo(expected).Using(comparer), "custom error message (expected={0}, actual={1}", expected, actual);
        }
Пример #3
0
        public void GeneratedErrorMessage()
        {
            int actual   = 10;
            int expected = 15;

            // Assert
            var comparer = new MyEqualityComparer();

            Assert.That(actual, Is.EqualTo(expected).Using(comparer));
        }
Пример #4
0
        public void CustomMessage()
        {
            int actual   = 10;
            int expected = 15;

            // Assert
            var comparer = new MyEqualityComparer();

            Assert.That(actual, Is.EqualTo(expected).Using(comparer), "custom error message (expected={0}, actual={1}", expected, actual);
        }