示例#1
0
            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);
            }
示例#2
0
            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);
            }
示例#3
0
            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);
            }
示例#4
0
            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);
            }
示例#5
0
            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);
            }
示例#6
0
            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));
 }
示例#9
0
 private static string MakeTestTagName()
 {
     return(TestFramework.MakeTestName("Test Tag Name", Tag.FieldLengths.TagName));
 }
示例#10
0
 private static string GetTestGrantModificationName(string grantModificationName)
 {
     return(TestFramework.MakeTestName(grantModificationName, GrantModification.FieldLengths.GrantModificationName));
 }