Skip to content

Commit

Permalink
Merge pull request #65 from hkutluay/add-time-unit-test
Browse files Browse the repository at this point in the history
Add time unit test
  • Loading branch information
hkutluay committed Oct 8, 2022
2 parents a113440 + 3927e64 commit 8f742ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion UblTr.Tests/InvoiceTypeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public void InvoiceType_BasicInvoice_Deserialize()
Assert.AreEqual("F47AC10B-58CC-4372-A567-0E02B2C3D479", invoice.UUID.Value);
Assert.AreEqual("1288331521", invoice.Signature[0].SignatoryParty.PartyIdentification.FirstOrDefault().ID.Value);
Assert.AreEqual(101, invoice.InvoiceLine.FirstOrDefault().InvoicedQuantity.Value);
Assert.AreEqual("14:42:00", invoice.IssueTime.Value.ToString("HH:mm:ss"));
}


Expand All @@ -53,6 +54,8 @@ public void InvoiceType_CommercialInvoice_Deserialize()
Assert.AreEqual("F47AC10B-58CC-4372-A567-0E02B2C3D479", invoice.UUID.Value);
Assert.AreEqual("1288331521", invoice.Signature[0].SignatoryParty.PartyIdentification.FirstOrDefault().ID.Value);
Assert.AreEqual(12, invoice.InvoiceLine.FirstOrDefault().InvoicedQuantity.Value);
Assert.AreEqual("14:42:00", invoice.IssueTime.Value.ToString("HH:mm:ss"));

}

[TestMethod]
Expand Down Expand Up @@ -131,7 +134,7 @@ public void InvoiceType_BasicInvoice_TimeSerialize()
doc.Load(stream);
var sn = doc.SelectSingleNode(xPath, namespaces);

Assert.AreEqual(sn.InnerText, date.ToString("HH:mm:ss"));
Assert.AreEqual(date.ToString("HH:mm:ss"), sn.InnerText);

}

Expand Down

0 comments on commit 8f742ae

Please sign in to comment.