コード例 #1
0
        public void ToString_NullCommandName_ReturnsMessage()
        {
            // arrange
            var sut = new InvalidCommandNameException(null);

            // act
            var result = sut.ToString();

            // assert
            Assert.Equal("The command name null is invalid", result);
        }
コード例 #2
0
        public void ToString_WhenCalled_ReturnsMessage()
        {
            // arrange
            var sut = new InvalidCommandNameException("bad name");

            // act
            var result = sut.ToString();

            // assert
            Assert.Equal("The command name 'bad name' is invalid", result);
        }