public void ShouldWorkWithExample1() { var expected = "{\"uqr\":1,\"tp\":1,\"nme\":\"Test company AB\",\"cid\":\"555555-5555\",\"iref\":\"52456\",\"ddt\":\"20130408\",\"due\":5,\"pt\":\"BG\",\"acc\":\"433-8778\"}"; var a = new PaymentInvoiceQR("Test company AB", "555555-5555") { InvoiceReference = "52456", DueDate = new DateTime(2013, 4, 8), DueAmount = 5, PaymentType = Enums.PaymentType.BG, Account = "433-8778" }; var actual = a.ToJson(); Assert.Equal(expected, actual); }
public void ShouldWorkWithExample2() { var expected = "{\"uqr\":1,\"tp\":1,\"nme\":\"Test company AB\",\"cid\":\"555555-5555\",\"iref\":\"52456\",\"idt\":\"20130408\",\"ddt\":\"20130508\",\"due\":5,\"pt\":\"BBAN\",\"acc\":\"6000658159712\",\"bc\":\"HANDSESS\"}"; var a = new PaymentInvoiceQR("Test company AB", "555555-5555") { InvoiceReference = "52456", InvoiceDate = new DateTime(2013, 4, 8), DueDate = new DateTime(2013, 5, 8), DueAmount = 5, PaymentType = Enums.PaymentType.BBAN, Account = "6000658159712", BankCode = "HANDSESS" }; var actual = a.ToJson(); Assert.Equal(expected, actual); }
public void First() { var expected = "{\"uqr\":1,\"tp\":1,\"nme\":\"Test Company AB\",\"cid\":\"555555-5555\",\"iref\":\"0470-706000\",\"idt\":\"20130424\",\"ddt\":\"20130524\",\"due\":4500,\"vat\":900,\"cur\":\"SEK\",\"pt\":\"BG\",\"acc\":\"433-8778\"}"; var a = new PaymentInvoiceQR("Test Company AB", "555555-5555") { InvoiceReference = "0470-706000", InvoiceDate = new DateTime(2013, 4, 24), DueDate = new DateTime(2013, 5, 24), DueAmount = 4500, VAT = 900, Currency = "SEK", PaymentType = Enums.PaymentType.BG, Account = "433-8778" }; var actual = a.ToJson(); Assert.Equal(expected, actual); }
public void Second() { var expected = "{\"uqr\":1,\"tp\":1,\"nme\":\"Test Company\",\"cid\":\"98-0202855\",\"cc\":\"US\",\"iref\":\"934000000000159\",\"ddt\":\"20120215\",\"due\":1.75,\"cur\":\"USD\",\"pt\":\"BBAN\",\"acc\":\"6000658159712\",\"bc\":\"ACIXUS33XXX\",\"adr\":\"12405,Acra\"}"; var a = new PaymentInvoiceQR("Test Company", "98-0202855") { InvoiceReference = "934000000000159", DueDate = new DateTime(2012, 2, 15), CountryCode = "US", DueAmount = 1.75m, Currency = "USD", PaymentType = Enums.PaymentType.BBAN, Account = "6000658159712", BankCode = "ACIXUS33XXX", Address = "12405,Acra" }; var actual = a.ToJson(); Assert.Equal(expected, actual); }
public void First() { var expected = "{\"uqr\":1,\"tp\":1,\"nme\":\"Test company AB\",\"cid\":\"555555-5555\",\"cc\":\"SE\",\"iref\":\"934000000000159\",\"idt\":\"20120215\",\"ddt\":\"20120215\",\"due\":10.75,\"cur\":\"DKK\",\"pt\":\"IBAN\",\"acc\":\"DK4830004073013895\",\"bc\":\"DABADKKK\",\"adr\":\"1092 Köpenhamn\"}"; var a = new PaymentInvoiceQR("Test company AB", "555555-5555") { InvoiceReference = "934000000000159", InvoiceDate = new DateTime(2012, 2, 15), DueDate = new DateTime(2012, 2, 15), CountryCode = "SE", DueAmount = 10.75m, Currency = "DKK", PaymentType = Enums.PaymentType.IBAN, Account = "DK4830004073013895", BankCode = "DABADKKK", Address = "1092 Köpenhamn" }; var actual = a.ToJson(); Assert.Equal(expected, actual); }
public void First() { var expected = "{\"uqr\":1,\"tp\":1,\"nme\":\"Test Company AS\",\"cid\":\"123456789MVA\",\"iref\":\"00001\",\"idt\":\"20130424\",\"ddt\":\"20130524\",\"due\":240,\"vh\":25,\"vm\":15,\"cur\":\"NOK\",\"pt\":\"BBAN\",\"acc\":\"86011117947\",\"bc\":\"DNBANOKK332\",\"adr\":\"0687 Oslo\"}"; var a = new PaymentInvoiceQR("Test Company AS", "123456789MVA") { InvoiceReference = "00001", InvoiceDate = new DateTime(2013, 4, 24), DueDate = new DateTime(2013, 5, 24), DueAmount = 240, HighVATAmount = 25, MediumVATAmount = 15, Currency = "NOK", PaymentType = Enums.PaymentType.BBAN, Account = "86011117947", BankCode = "DNBANOKK332", Address = "0687 Oslo" }; var actual = a.ToJson(); Assert.Equal(expected, actual); }