Ejemplo n.º 1
0
        public void can_emit_xml_describing_Transaction()
        {
            var transaction = new Transaction(_journal, TransactionDirection.In, _account, 10.99M, "Stylophone & Stylodrum");

            const string expectedResult = @"<transaction direction=""1"" account=""1"" amount=""10.99"" note=""Stylophone &amp; Stylodrum"" isVerified=""false"" />";

            Assert.AreEqual(expectedResult, transaction.EmitXml().ToString());
        }
Ejemplo n.º 2
0
        public void Transaction_emit_xml_does_handles_missing_attributes()
        {
            var transaction = new Transaction(_journal, TransactionDirection.In);

            const string expectedResult = @"<transaction direction=""1"" amount=""0"" note="""" isVerified=""false"" />";

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