private void AssertSubmittedInvoices(TestResults testResults, ERPSystemCode[] erpsToTest, int[] countByERP, ERPSystemCode systemCode)
        {
            var submittedInvoices = testResults.GetSubmittedInvoices(systemCode);

            Assert.Equal(countByERP[Array.BinarySearch(erpsToTest, systemCode)], submittedInvoices.Count);

            foreach (var invoice in submittedInvoices)
            {
                Assert.Equal(systemCode, invoice.erp);
            }
        }
 internal Invoice(ERPSystemCode erp, int?invoiceId, decimal amount)
 {
     this.erp       = erp;
     this.invoiceId = invoiceId;
     this.amount    = amount;
 }
 public static Invoice With(ERPSystemCode erp, int?invoiceId, decimal amount)
 {
     return(new Invoice(erp, invoiceId, amount));
 }
 public IList <Invoice> GetSubmittedInvoices(ERPSystemCode code)
 => submittedInvoices.ReadFrom <ERPSystemCode, IList <Invoice> >("submittedInvoices", code);
 public ERPSpecificInvoiceSubmitter(ERPSystemCode erp, TestResults testResults)
 {
     this.erp         = erp;
     this.testResults = testResults;
 }
 public ERPSpecificInvoiceSubmitter(ERPSystemCode erp, TestUntil testUntil)
 {
     this.erp       = erp;
     this.testUntil = testUntil;
     submitted      = new List <Invoice>();
 }