public void ScoreHolderArgument_ParseShouldFail_WithAllPlayersSelector_WhenLimitedToOneTarget()
        {
            // Arrange
            ScoreHolderArgument argument = new ScoreHolderArgument(false);
            IStringReader       reader   = new StringReader("@a");

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

            // Assert
            Assert.IsFalse(readResults.Successful);
        }
        public void ScoreHolderArgument_ParseShouldSucceed_WithSingleTarget_WhenLimitedToOneTarget()
        {
            // Arrange
            ScoreHolderArgument argument = new ScoreHolderArgument(false);
            IStringReader       reader   = new StringReader("foo");

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

            // Assert
            Assert.IsTrue(readResults.Successful);
        }
        public void ScoreHolderArgument_ShouldNotRead_SpaceCharacter()
        {
            // Arrange
            ScoreHolderArgument argument = new ScoreHolderArgument();
            IStringReader       reader   = new StringReader("foo bar");

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

            // Assert
            Assert.IsTrue(reader.CanRead(4));
        }
        public void ScoreHolderArgument_ParseShouldSucceed_WithSpecialCharacters()
        {
            // Arrange
            ScoreHolderArgument argument = new ScoreHolderArgument();
            IStringReader       reader   = new StringReader("!foo-bar@baz#");

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

            // Assert
            Assert.IsTrue(readResults.Successful);
        }
        public void ScoreHolderArgument_ParseShouldSucceed_WithSelector()
        {
            // Arrange
            ScoreHolderArgument argument = new ScoreHolderArgument();
            IStringReader       reader   = new StringReader("@a");

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

            // Assert
            Assert.IsTrue(readResults.Successful);
        }
        public void ScoreHolderArgument_ParseShouldSucceeds_WithAllPlayersSelector_WhenLimitedToOneEntity_WhenLimitedToOneTarget()
        {
            // Arrange
            EntitySelectorOptions.Set("{\"limit\":{\"predicate\":\"set_limit\"}}");
            ScoreHolderArgument argument = new ScoreHolderArgument(false);
            IStringReader       reader   = new StringReader("@a[limit=1]");

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

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