public DatabaseService(IStoreDatabaseFactory storeDatabaseFactory)
 {
     TableItem                 = storeDatabaseFactory.CreateTableItem();
     TableItemGroup            = storeDatabaseFactory.CreateTableItemGroup();
     TableFloorplan            = storeDatabaseFactory.CreateTableFloorplan();
     TableStoreSection         = storeDatabaseFactory.CreateTableStoreSection();
     TableItemSectionPlacement = storeDatabaseFactory.CreateTableItemSectionPlacement();
 }
Example #2
0
        public void setup()
        {
            // Creates Substitutes
            _db                = Substitute.For <IDatabaseService>();
            _tableItem         = Substitute.For <ITableItem>();
            _tableFloorplan    = Substitute.For <ITableFloorplan>();
            _tableItemGroup    = Substitute.For <ITableItemGroup>();
            _tablePlacement    = Substitute.For <ITableItemSectionPlacement>();
            _tableStoreSection = Substitute.For <ITableStoreSection>();
            _searcher          = Substitute.For <ISearcher>();

            // Sets common empty returns
            _tablePlacement.FindPlacementsByItem(Arg.Any <long>()).Returns(new List <StoreSection>());
            _tableItemGroup.GetItemGroup(Arg.Any <long>()).Returns(new ItemGroup("", 0, 0));
            LoadBLL();
        }