public void getContext_short() { var exception = new CommandSyntaxException(Substitute.For <ICommandExceptionType>(), new LiteralMessage("error"), "Hello world!", 5); exception.Context.Should().BeEquivalentTo("Hello<--[HERE]"); }
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]"); }
public void getContext_none() { var exception = new CommandSyntaxException(Substitute.For <ICommandExceptionType>(), new LiteralMessage("error")); exception.Context.Should().BeNull(); }