Esempio n. 1
0
 public void SetUp()
 {
     processor = new Processor<string>();
     processor.AddOperator(new ComposeDefault());
     processor.AddOperator(new ComposeException());
     processor.AddMemory<SavedInstance>();
     processor.AddMemory<Symbol>();
 }
 [SetUp] public void SetUp()
 {
     processor = new Processor <string>();
     processor.AddOperator(new ComposeDefault());
     processor.AddOperator(new ComposeException());
     processor.AddMemory <SavedInstance>();
     processor.AddMemory <Symbol>();
 }
Esempio n. 3
0
        [Test] public void ListIsComposedAsTree()
        {
            processor.AddOperator(new ComposeDefault());
            var result = Compose(new ComposeList(), new List <object> {
                "a", 1.23
            }, typeof(List <object>));

            Assert.IsNotNull(result);
            Assert.AreEqual(2, result.Branches.Count);
            Assert.AreEqual("a", result.Branches[0].Value);
            Assert.AreEqual("1.23", result.Branches[1].Value);
        }