Exemple #1
0
        public void BlockPosArgument_ParseShouldFail_BecauseMixedCoordinateTypes()
        {
            // Arrange
            BlockPosArgument argument = new BlockPosArgument();
            IStringReader    reader   = new StringReader("~1 ^2 3");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsFalse(readResults.Successful);
        }
Exemple #2
0
        public void BlockPosArgument_ParseShouldSucceed_WithEmptyLocalCoordinates()
        {
            // Arrange
            BlockPosArgument argument = new BlockPosArgument();
            IStringReader    reader   = new StringReader("^ ^ ^");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsTrue(readResults.Successful);
        }
Exemple #3
0
        public void BlockPosArgument_ParseShouldFail_BecauseInvalidInteger()
        {
            // Arrange
            BlockPosArgument argument = new BlockPosArgument();
            IStringReader    reader   = new StringReader("1.0 2.0 3.0");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsFalse(readResults.Successful);
        }
Exemple #4
0
        public void BlockPosArgument_ParseShouldSucceed_WithRelativeWorldCoordinates()
        {
            // Arrange
            BlockPosArgument argument = new BlockPosArgument();
            IStringReader    reader   = new StringReader("~1.0 ~2.0 ~3.0");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsTrue(readResults.Successful);
        }
Exemple #5
0
        public void BlockPosArgument_ParseShouldSucceed()
        {
            // Arrange
            BlockPosArgument argument = new BlockPosArgument();
            IStringReader    reader   = new StringReader("1 2 3");

            // Act
            ReadResults readResults = argument.Parse(reader, out _);

            // Assert
            Assert.IsTrue(readResults.Successful);
        }