public void TestAddBeforeBad()
 {
     var s = new StatementInlineBlock();
     var s1 = new StatementSimpleStatement("one");
     var s2 = new StatementSimpleStatement("two");
     s.AddBefore(s1, s2);
 }
Ejemplo n.º 2
0
        public void TestAddBeforeBad()
        {
            var s  = new StatementInlineBlock();
            var s1 = new StatementSimpleStatement("one");
            var s2 = new StatementSimpleStatement("two");

            s.AddBefore(s1, s2);
        }
Ejemplo n.º 3
0
        public void TestAddBeforeParentNonNullParent()
        {
            var s  = new StatementInlineBlock();
            var s1 = new StatementSimpleStatement("one");
            var s2 = new StatementSimpleStatement("two");

            s1.Parent = s;
            s.Add(s2);
            s.AddBefore(s1, s2);
        }
        public void TestAddBeforeParent()
        {
            var s = new StatementInlineBlock();
            var s1 = new StatementSimpleStatement("one");
            var s2 = new StatementSimpleStatement("two");
            s.Add(s2);
            s.AddBefore(s1, s2);

            Assert.AreEqual(s, s1.Parent, "s1 parent");
            Assert.AreEqual(s, s2.Parent, "s2 parent");
        }
        public void TestAddBefore()
        {
            var s = new StatementInlineBlock();
            var s1 = new StatementSimpleStatement("one");
            var s2 = new StatementSimpleStatement("two");
            s.Add(s2);
            s.AddBefore(s1, s2);

            Assert.AreEqual(2, s.Statements.Count(), "# of statements");
            Assert.AreEqual(s1, s.Statements.First(), "first statement");
            Assert.AreEqual(s2, s.Statements.Skip(1).First(), "second statement");
        }
Ejemplo n.º 6
0
        public void TestAddBeforeParent()
        {
            var s  = new StatementInlineBlock();
            var s1 = new StatementSimpleStatement("one");
            var s2 = new StatementSimpleStatement("two");

            s.Add(s2);
            s.AddBefore(s1, s2);

            Assert.AreEqual(s, s1.Parent, "s1 parent");
            Assert.AreEqual(s, s2.Parent, "s2 parent");
        }
Ejemplo n.º 7
0
        public void TestAddBefore()
        {
            var s  = new StatementInlineBlock();
            var s1 = new StatementSimpleStatement("one");
            var s2 = new StatementSimpleStatement("two");

            s.Add(s2);
            s.AddBefore(s1, s2);

            Assert.AreEqual(2, s.Statements.Count(), "# of statements");
            Assert.AreEqual(s1, s.Statements.First(), "first statement");
            Assert.AreEqual(s2, s.Statements.Skip(1).First(), "second statement");
        }
 public void TestAddBeforeParentNonNullParent()
 {
     var s = new StatementInlineBlock();
     var s1 = new StatementSimpleStatement("one");
     var s2 = new StatementSimpleStatement("two");
     s1.Parent = s;
     s.Add(s2);
     s.AddBefore(s1, s2);
 }