Ejemplo n.º 1
0
        public Task Should_Write_Exception_With_Inner_Exception()
        {
            // Given
            var console = new PlainConsole(width: 1024);
            var dex     = GetException(() => TestExceptions.ThrowWithInnerException());

            // When
            var result = console.WriteNormalizedException(dex);

            // Then
            return(Verifier.Verify(result));
        }
Ejemplo n.º 2
0
        public Task Should_Write_Exceptions_With_Generic_Type_Parameters_In_Callsite_As_Expected()
        {
            // Given
            var console = new PlainConsole(width: 1024);
            var dex     = GetException(() => TestExceptions.ThrowWithGenericInnerException());

            // When
            var result = console.WriteNormalizedException(dex);

            // Then
            return(Verifier.Verify(result));
        }
Ejemplo n.º 3
0
        public Task Should_Write_Exception_With_Shortened_Methods()
        {
            // Given
            var console = new PlainConsole(width: 1024);
            var dex     = GetException(() => TestExceptions.MethodThatThrows(null));

            // When
            var result = console.WriteNormalizedException(dex, ExceptionFormats.ShortenMethods);

            // Then
            return(Verifier.Verify(result));
        }