Esempio n. 1
0
        public void can_emit_xml_describing_Account()
        {
            var account = new Account(3, "Eating Out", AccountType.Expense) {IsEnabled = false};
            account.AddTag(_accountTag2);
            account.AddTag(_accountTag3);

            const string expectedResult = @"<account id=""3"" name=""Eating Out"" type=""4"" isEnabled=""false"">
              <tags>
            <tag>2</tag>
            <tag>3</tag>
              </tags>
            </account>";

            Assert.AreEqual(expectedResult, account.EmitXml().ToString());
        }