Example #1
0
        public void Test20()
        {
            var code = @"
                st = new Stage
                    Name = 'st'
                p1 = new Process
                    Name = 'p1'
                p2 = new Process
                    Name = 'p2'
                w1 = new Work
                k1 = new Kanban
                    PullFrom = new Location
                        Stage = st
                        Path = '\'
                        Process = p1
                    PullTo = new Location
                        Stage = st
                        Path = '\'
                        Process = p2
                    Work = w1
            ";
            var jac  = new JacInterpreter();

            jac.Exec(code);
            var st = jac.GetStage("st");
            var k1 = jac.GetKanban("k1");
            var p1 = jac.GetProcess("p1");
            var p2 = jac.GetProcess("p2");
            var w1 = jac.GetWork("w1");

            Assert.IsNotNull(k1);
            Assert.IsNotNull(p1);
            Assert.IsNotNull(p2);
            Assert.IsNotNull(w1);
            Assert.AreEqual(k1.PullFrom.Stage, st);
            Assert.AreEqual(k1.PullFrom.Process.ID, p1.ID);
            Assert.AreEqual(k1.PullTo.Process.ID, p2.ID);
            Assert.AreEqual(k1.Work, w1);
        }