19 return new Product() { ProductName =
"BestProductEver" };
43 var product =
context.Products.Add(
new Product() { ProductName =
"BestProductEver" });
57 var product =
context.Products.Add(
new Product() { ProductName =
"BestProductEver" });
58 context.Products.Add(
new Product() { ProductName =
"AnotherProduct" });
74 ModuleLevelName =
"Stock and fond 1",
75 ModuleLevelRestriction =
"250M/100tr",
105 PriceListName =
"2022",
106 DateFrom = DateTime.Parse(
"2017-01-01"),
107 DateTo = DateTime.Parse(
"2017-12-31"),
136 OrganizationNumber =
"123 456 789",
137 CustomerName =
"Customer1",
138 CustomerSince = DateTime.Now
153 OrganizationNumber =
"123 456 789",
154 CustomerName =
"Customer1",
155 CustomerSince = DateTime.Now
159 OrganizationNumber =
"111 111 111",
160 CustomerName =
"Customer2",
161 CustomerSince = DateTime.Now
176 OrganizationNumber =
"123 456 789",
177 CustomerName =
"Customer1",
178 CustomerSince = DateTime.Now,
187 OrganizationNumber =
"888 888 888",
188 CustomerName =
"CustomerTest",
189 CustomerSince = DateTime.Now,
225 AgreementName =
"Escali Financials",
226 AgreementCreated = DateTime.Now,
230 AgreementUpdated = DateTime.Now
233 context.Modules.Add(
new Module() { ModuleName =
"Module1", ProductSeq = 1 });
237 ModuleLevelName =
"Stock and fond 1",
238 ModuleLevelRestriction =
"250M/100tr",
Reusable methods for inserting information into tests
static DataContext InsertCustomers(DataContext context)
Insert two Customers into DataContext
static DataContext InsertProductAndModule(DataContext context)
Inserts Product and Module into the context Used for inserting product and module into the test envir...
static DataContext InsertCustomerWithRegionData(DataContext context)
Inserts two Customer combined with region data into the DataContext
static DataContext InsertDataForPriceElement(DataContext context)
static DataContext InsertDataForAgreement(DataContext context)
Combined insertion for Currency, Product and Customer into DataContext for broader test option
static DataContext InsertProduct(DataContext context)
Inserts Product into the context Used for inserting product into the test environment
static Product CreateProduct()
Creates a Product
static DataContext InsertDataForAgreementElement(DataContext context)
Uses InsertDataForAgreement Then add agreement with references to a currency, a product and a custome...
static DataContext InsertCurrency(DataContext context)
Inserts Currency into DataContext
static DataContext InsertDoubleProductAndModule(DataContext context)
Inserts two Product and Module into the context Used for inserting product and module into the test e...
static DataContext InsertModuleLevelAndFKs(DataContext context)
Adds a ModuleLevel to an Module with a FK
static DataContext InsertCustomer(DataContext context)
Inserting customer into DB (only non nullable field defined)
static DataContext InsertPriceList(DataContext context)
Inserts a PriceList into DataContext Product must be inserted before this method is called