public static Organization Create() { var organizationType = TestOrganizationType.Create(); var orgTestName = TestFramework.MakeTestName("Organization", Organization.FieldLengths.OrganizationName); var orgTestShortName = TestFramework.MakeTestName("OrgShortName", Organization.FieldLengths.OrganizationShortName); var organization = new Organization(orgTestName, orgTestShortName, true, organizationType, true); return(organization); }
public static Grant Create() { var grantStatus = GetDefaultGrantStatus(); var organization = TestFramework.TestOrganization.Create(); var grant = new Grant(TestFramework.MakeTestName("Grant", Grant.FieldLengths.GrantName), grantStatus, organization); //Grant.IsActive = true; return(grant); }
public static Grant Create(DatabaseEntities dbContext) { var organization = TestFramework.TestOrganization.Insert(dbContext); string testGrantName = TestFramework.MakeTestName("Test Grant Name"); var testGrantStatus = GetDefaultGrantStatus(); var grant = new Grant(testGrantName, testGrantStatus, organization); dbContext.Grants.Add(grant); return(grant); }
public static Invoice Create() { var testPerson = TestPerson.Create(); var invoice = new Invoice(TestFramework.MakeTestName("RequestorName", Invoice.FieldLengths.RequestorName), DateTime.Now, testPerson, InvoiceApprovalStatus.Approved, false, InvoiceMatchAmountType.N_A, InvoiceStatus.Pending); return(invoice); }
public static GrantAllocation Create(DatabaseEntities dbContext) { var grantModification = TestFramework.TestGrantModification.Insert(dbContext); string testGrantAllocationName = TestFramework.MakeTestName("Test Grant Allocation Name"); var grantAllocation = new GrantAllocation(grantModification); grantAllocation.GrantAllocationName = testGrantAllocationName; dbContext.GrantAllocations.Add(grantAllocation); 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); }
private static string MakeTestImagefileBaseName() { return(TestFramework.MakeTestName("SomeTestImageFile", FileResource.FieldLengths.OriginalBaseFilename)); }
private static string MakeTestProjectNoteUpdateString() { return(TestFramework.MakeTestName("TestProjectNoteUpdate", ProjectNoteUpdate.FieldLengths.Note)); }
private static string MakeTestTagName() { return(TestFramework.MakeTestName("Test Tag Name", Tag.FieldLengths.TagName)); }
private static string GetTestGrantModificationName(string grantModificationName) { return(TestFramework.MakeTestName(grantModificationName, GrantModification.FieldLengths.GrantModificationName)); }