示例#1
0
        public void WhenNotMatchedCoordinatesAreGiven_ThenShouldThrowCommandSplit(string command)
        {
            // Arrange
            ICommandSplitter <SurfaceSize> commandSplitter = new PlateauCommandSplitter();

            // Act, Assert
            Assert.Throws <CommandFormatException>(() => commandSplitter.Split(command));
        }
示例#2
0
        public void WhenCoordinatesAreGiven_ThenShouldCommandSplit(string command, int width, int height)
        {
            // Arrange
            ICommandSplitter <SurfaceSize> commandSplitter = new PlateauCommandSplitter();

            // Act
            var commandResult = commandSplitter.Split(command);

            // Assert
            Assert.Equal(width, commandResult.Width);
            Assert.Equal(height, commandResult.Height);
        }