public LocalFixture()
            {
                Fixture = CommonFixture.GetNewFixture();

                StoreRepositoryMock = new StoreRepositoryMock(Fixture);

                StoreItemAvailabilityFixture = new StoreItemAvailabilityFixture(CommonFixture);
                StoreSectionFixture          = new StoreSectionFixture(CommonFixture);
                StoreFixture = new StoreFixture(CommonFixture);
            }
        protected override (Section, IStoreSection) CreateTestObjects()
        {
            var commonFixture       = new CommonFixture();
            var storeSectionFixture = new StoreSectionFixture(commonFixture);

            var destination = storeSectionFixture.Create(new StoreSectionDefinition());
            var source      = GetSource(destination, commonFixture);

            return(source, destination);
        }
            public IStore CreateStore(StoreId storeId, SectionId sectionId)
            {
                var sectionDef = StoreSectionDefinition.FromId(sectionId);

                var storeDef = new StoreDefinition
                {
                    Id       = storeId,
                    Sections = StoreSectionFixture.CreateMany(sectionDef, 1)
                };

                return(StoreFixture.CreateValid(storeDef));
            }
            public IStore CreateStore(IShoppingList shoppingList, SectionId sectionId)
            {
                var sectionDef = StoreSectionDefinition.FromId(sectionId);
                var section    = StoreSectionFixture.Create(sectionDef);

                var storeDef = new StoreDefinition
                {
                    Id       = shoppingList.StoreId,
                    Sections = section.ToMonoList()
                };

                return(StoreFixture.CreateValid(storeDef));
            }
            public LocalFixture()
            {
                Fixture = CommonFixture.GetNewFixture();

                StoreItemAvailabilityFixture = new StoreItemAvailabilityFixture(CommonFixture);
                StoreItemFixture             = new StoreItemFixture(StoreItemAvailabilityFixture, CommonFixture);
                StoreSectionFixture          = new StoreSectionFixture(CommonFixture);
                StoreFixture        = new StoreFixture(CommonFixture);
                ItemCategoryFixture = new ItemCategoryFixture(CommonFixture);
                ManufacturerFixture = new ManufacturerFixture(CommonFixture);

                ItemCategoryRepositoryMock = new ItemCategoryRepositoryMock(Fixture);
                ManufacturerRepositoryMock = new ManufacturerRepositoryMock(Fixture);
            }
            public IEnumerable <IStore> CreateValidStores(IEnumerable <IStoreItemAvailability> availabilities)
            {
                var availabilitiesList = availabilities.ToList();

                foreach (var availability in availabilitiesList)
                {
                    var section = StoreSectionFixture.Create(StoreSectionDefinition.FromId(availability.DefaultSectionId));

                    var def = new StoreDefinition
                    {
                        Id       = availability.StoreId,
                        Sections = section.ToMonoList()
                    };
                    yield return(StoreFixture.CreateValid(def));
                }
            }
            public LocalFixture()
            {
                Fixture = CommonFixture.GetNewFixture();

                ShoppingListFixture          = new ShoppingListFixture(CommonFixture);
                ShoppingListMockFixture      = new ShoppingListMockFixture(CommonFixture, ShoppingListFixture);
                ShoppingListSectionFixture   = new ShoppingListSectionFixture(CommonFixture);
                ShoppingListItemFixture      = new ShoppingListItemFixture(CommonFixture);
                StoreItemAvailabilityFixture = new StoreItemAvailabilityFixture(CommonFixture);
                StoreItemFixture             = new StoreItemFixture(StoreItemAvailabilityFixture, CommonFixture);
                StoreSectionFixture          = new StoreSectionFixture(CommonFixture);
                StoreFixture = new StoreFixture(CommonFixture);

                ShoppingListSectionFactoryMock = new ShoppingListSectionFactoryMock(Fixture);
                StoreRepositoryMock            = new StoreRepositoryMock(Fixture);
                ItemRepositoryMock             = new ItemRepositoryMock(Fixture);
                ShoppingListItemFactoryMock    = new ShoppingListItemFactoryMock(Fixture);
            }