Example #1
0
        public void Section_AddAtPosition()
        {
            var section     = new Section("セクション");
            var subsection1 = new Subsection("第一款");
            var subsection2 = new Subsection("第二款");

            section.Add(subsection1, subsection2);
            CollectionAssert.AreEqual(new[] { subsection1, subsection2 }, section.Subsections.ToArray());

            var subsection3 = new Subsection("第三款");

            section.AddAt(2, subsection3);
            CollectionAssert.AreEqual(new[] { subsection1, subsection3, subsection2 }, section.Subsections.ToArray());
        }