public TestEnvironmentObject(TestEnvironmentCreateContext createContext, ITestMocks mocks)
        {
            _productsTable = createContext.Products;

            ElementInfos = new TestDbObjectList <string, ElementInfo>(
                k =>
            {
                var p = Products.Get(k);
                return(new ElementInfo(p.Info, ItemId.New(), 1));
            });

            //Prices = new Dictionary<string, ElementPrice>();

            SalesOrderEntities = createContext.Documents.SalesOrderEntities;

            DocumentFactories = new DocumentFactoryProvider(this);

            Products = new ProductsProvider(createContext.Products);

            Mocks = mocks;
        }
Esempio n. 2
0
 public DocumentsTable(ProductsTable productsTable, ITestMocks mocks)
 {
     _productsTable     = productsTable;
     _mocks             = mocks;
     SalesOrderEntities = new List <int>();
 }
Esempio n. 3
0
 public ProductsTable(ITestMocks mocks)
 {
     _mocks    = mocks;
     _products = new Dictionary <string, Product>();
 }
Esempio n. 4
0
 public TestEnvironmentCreateContext(ITestMocks mocks)
 {
     Products          = new ProductsTable(mocks);
     DiscountStructure = new DiscountStructureTable(Products);
     Documents         = new DocumentsTable(Products, mocks);
 }