public static ProjectGrantAllocationExpenditure Create() { var project = TestProject.Create(); var grantAllocation = TestGrantAllocation.Create(); return(Create(project, grantAllocation)); }
public static GrantAllocation Create() { var grantModification = TestGrantModification.Create(); var org = TestOrganization.Create(); var grantAllocation = TestGrantAllocation.Create(grantModification, GetTestGrantAllocationName(org, "Test Grant Allocation")); //GrantAllocation.IsActive = true; return(grantAllocation); }
public static InvoiceLineItem Create(DatabaseEntities dbContext, CostType costType) { var invoice = TestInvoice.Create(); var grantAllocation = TestGrantAllocation.CreateWithoutChangingName("Test Grant Allocation"); var testInvoiceLineItem = new InvoiceLineItem(invoice, grantAllocation, costType, 1m); //InvoiceLineItem.CreateNewBlank(invoice, grantAllocation, costType); string testInvoiceLineItemNote = TestFramework.MakeTestName($"Test Invoice Line Item for CostType: {costType.CostTypeDisplayName}"); testInvoiceLineItem.InvoiceLineItemNote = testInvoiceLineItemNote; dbContext.InvoiceLineItems.Add(testInvoiceLineItem); return(testInvoiceLineItem); }