Beispiel #1
0
        public void getContext_short()
        {
            var exception = new CommandSyntaxException(Substitute.For <ICommandExceptionType>(), new LiteralMessage("error"), "Hello world!", 5);

            exception.Context.Should().BeEquivalentTo("Hello<--[HERE]");
        }
Beispiel #2
0
        public void getContext_long()
        {
            var exception = new CommandSyntaxException(Substitute.For <ICommandExceptionType>(), new LiteralMessage("error"), "Hello world! This has an error in it. Oh dear!", 20);

            exception.Context.Should().BeEquivalentTo("...d! This ha<--[HERE]");
        }
Beispiel #3
0
        public void getContext_none()
        {
            var exception = new CommandSyntaxException(Substitute.For <ICommandExceptionType>(), new LiteralMessage("error"));

            exception.Context.Should().BeNull();
        }