Exemplo n.º 1
0
        /// <summary>
        /// Gets the unique type name between expected and actual.
        /// </summary>
        /// <param name="expected">The expected value</param>
        /// <param name="actual">The actual value causing the failure</param>
        /// <param name="expectedType">Output of the unique type name for expected</param>
        /// <param name="actualType">Output of the unique type name for actual</param>
        private void ResolveTypeNameDifference(object expected, object actual, out string expectedType, out string actualType) {
            TypeNameDifferenceResolver resolver = new TypeNameDifferenceResolver();
            resolver.ResolveTypeNameDifference(expected, actual, out expectedType, out actualType);

            expectedType = $" ({expectedType})";
            actualType = $" ({actualType})";
        }
Exemplo n.º 2
0
        private void TestShortenedNameDifference(object objA, object objB, string expectedA, string expectedB)
        {
            _differenceGetter.ResolveTypeNameDifference(
                objA, objB, out var actualA, out var actualB);

            Assert.That(actualA, Is.EqualTo(expectedA));
            Assert.That(actualB, Is.EqualTo(expectedB));
        }