示例#1
0
        public void can_emit_xml_describing_Template()
        {
            var date = new DateTime(2011, 5, 24);
            var journal = new Journal(3, date, "Rent");

            var template = new Template();
            template.AddJournal(journal);

            const string expected = @"<template>
              <journal id=""3"" date=""2011-05-24T00:00:00"" description=""Rent"" isVerified=""false"">
            <transactions />
              </journal>
            </template>";
            var actual = template.EmitXml().ToString();
            Assert.AreEqual(expected, actual);
        }