Exemplo n.º 1
0
 public void ItTracesAcrossGroups()
 {
     var code = "Has account\r\n  Is Balanced\r\n  Type is Savings";
     var trace = Trace(code);
     var ast = new DaisyTracePrinter(trace);
     var printed = ast.Print();
     Console.WriteLine(printed);
     Assert.IsInstanceOf<GroupOperatorTrace>(trace);
     var groupTrace = (GroupOperatorTrace) trace;
     Assert.AreEqual(3, groupTrace.Frames.Count);
 }
Exemplo n.º 2
0
 public void ItCollectsTracings()
 {
     var code = "Has account\r\n  Is Balanced";
     var trace = Trace(code);
     var ast = new DaisyTracePrinter(trace);
     var printed = ast.Print();
     Console.WriteLine(printed);
     Assert.IsInstanceOf<GroupOperatorTrace>(trace);
     var groupTrace = (GroupOperatorTrace) trace;
     Assert.AreEqual(1,groupTrace.Tracings.Count);
     Assert.AreEqual("Has 3 accounts",groupTrace.Tracings.First());
 }
Exemplo n.º 3
0
        public void ItTracesAcrossGroups()
        {
            var code    = "Has account\r\n  Is Balanced\r\n  Type is Savings";
            var trace   = Trace(code);
            var ast     = new DaisyTracePrinter(trace);
            var printed = ast.Print();

            Console.WriteLine(printed);
            Assert.IsInstanceOf <GroupOperatorTrace>(trace);
            var groupTrace = (GroupOperatorTrace)trace;

            Assert.AreEqual(3, groupTrace.Frames.Count);
        }
Exemplo n.º 4
0
        public void ItCollectsTracings()
        {
            var code    = "Has account\r\n  Is Balanced";
            var trace   = Trace(code);
            var ast     = new DaisyTracePrinter(trace);
            var printed = ast.Print();

            Console.WriteLine(printed);
            Assert.IsInstanceOf <GroupOperatorTrace>(trace);
            var groupTrace = (GroupOperatorTrace)trace;

            Assert.AreEqual(1, groupTrace.Tracings.Count);
            Assert.AreEqual("Has 3 accounts", groupTrace.Tracings.First());
        }