コード例 #1
0
ファイル: ProposalTests.cs プロジェクト: neontapir/docunatr
        public void Proposal_AddAtPosition()
        {
            var proposal = new Proposal("セクション");
            var section1 = new Section("セクション1");
            var section2 = new Section("セクション2");

            proposal.Add(section1, section2);
            CollectionAssert.AreEqual(new[] { section1, section2 }, proposal.Sections.ToArray());

            var section3 = new Section("セクション3");

            proposal.AddAt(2, section3);
            CollectionAssert.AreEqual(new[] { section1, section3, section2 }, proposal.Sections.ToArray());
        }