Exemplo n.º 1
0
        private void TestBoolean(string expression, bool expectedResult)
        {
            //Arrange
            var variable = new CosmosVariable($"#test", expectedResult.AsCosmosBoolean());

            BuildSnippetInterpreter(BuildAllocationSnippet(variable.Name, expression));

            //Act
            using (new AssertionScope())
            {
                interpreter.Execute().Should().BeTrue();
                parser.Errors.Should().BeEmpty();
            }


            //Assert
            parser.Variables.
            Should().ContainKey(variable.Name).
            WhichValue.Should().BeEquivalentTo(variable, expression + " should be " + expectedResult);
        }
Exemplo n.º 2
0
 public void TestBoolInput(bool param)
 {
     TestInputGeneric(param.AsCosmosBoolean());
     TestInputGeneric(param.AsCosmosBoolean());
 }