예제 #1
0
        public void Proposal_ToString()
        {
            var proposal = new Proposal("Proposal");

            Assert.AreEqual(@"Proposal { Title: ""Proposal"", Sections: [] }", proposal.ToString());

            proposal.Add(new Section("Section"));
            Assert.AreEqual(@"Proposal { Title: ""Proposal"", Sections: [Section { Title: ""Section"", Subsections: [] }] }", proposal.ToString());

            proposal.Add(new Section("セクション2", new Subsection("第三款")));
            Assert.AreEqual(@"Proposal { Title: ""Proposal"", Sections: [Section { Title: ""Section"", Subsections: [] }, Section { Title: ""セクション2"", Subsections: [Subsection { Title: ""第三款"" }] }] }", proposal.ToString());
        }