예제 #1
0
        public static bool IsMatch(CompareOperator <Cell> compareOperator, string value)
        {
            var processor = new CellProcessorBase();

            processor.AddOperator(new CompareDefault());
            return(compareOperator.CanCompare(new TypedValue(null, typeof(object)), TestUtils.CreateCell(value)));
        }
예제 #2
0
 [SetUp] public void SetUp()
 {
     processor = new CellProcessorBase();
     processor.AddOperator(new TestParseInterpreter());
     execute = new ExecuteStoryTest(processor, (t, c) => {});
     tables  = new CellTree(new CellTree(new CellTree("myfixture")));
 }
예제 #3
0
 public static bool IsMatch(ExecuteCommand command, ExecuteOperator<Cell> executor, Tree<Cell> parameters)
 {
     var processor = new CellProcessorBase();
     processor.AddOperator(new ParseMemberName());
     ((CellOperator) executor).Processor = processor;
     return executor.CanExecute(new TypedValue(new ExecuteContext(command, null, new TypedValue("stuff"))), parameters);
 }
예제 #4
0
        public static bool IsMatch(ExecuteCommand command, ExecuteOperator <Cell> executor, Tree <Cell> parameters)
        {
            var processor = new CellProcessorBase();

            processor.AddOperator(new ParseMemberName());
            ((CellOperator)executor).Processor = processor;
            return(executor.CanExecute(new TypedValue(new ExecuteContext(command, new TypedValue("stuff"))), parameters));
        }
예제 #5
0
        [Test] public void ComposesAsRaw()
        {
            var processor = new CellProcessorBase();

            processor.AddOperator(new TestCompose());
            var showAs = new ComposeShowAsOperator {
                Processor = processor
            };
            var subject = new ComposeShowAsOperator(new [] { CellAttribute.Raw }, "stuff");
            var result  = showAs.Compose(new TypedValue(subject));

            Assert.IsTrue(result.Value.HasAttribute(CellAttribute.Raw));
        }
예제 #6
0
 public static bool IsMatch(ExecuteCommand command, InvokeCommandBase executor, Tree<Cell> parameters)
 {
     var processor = new CellProcessorBase();
     processor.AddOperator(new ParseMemberName());
     executor.Processor = processor;
     return executor.CanExecute(new ExecuteContext(command, new TypedValue("stuff")), new ExecuteParameters(parameters));
 }
예제 #7
0
 public static bool IsMatch(CompareOperator<Cell> compareOperator, string value)
 {
     var processor = new CellProcessorBase();
     processor.AddOperator(new CompareDefault());
     return compareOperator.CanCompare(new TypedValue(null, typeof(object)), TestUtils.CreateCell(value));
 }