コード例 #1
0
        public void OperationArgument_ParseShouldFail_BecauseInvalidOperation()
        {
            // Arrange
            Operations.Set("[\"+=\",\"-=\"]");
            OperationArgument argument = new OperationArgument();
            IStringReader     reader   = new StringReader("!=");

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

            // Assert
            Assert.IsFalse(readResults.Successful);
        }
コード例 #2
0
        public void OperationArgument_ParseShouldSucceed()
        {
            // Arrange
            Operations.Set("[\"+=\",\"-=\"]");
            OperationArgument argument = new OperationArgument();
            IStringReader     reader   = new StringReader("+=");

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

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