public override void FixtureSetup()
        {
            base.FixtureSetup();

            DbPreTestDataWorker.DeleteAllEntityCollections();

            _service = MerchelloContext.Current.Services.EntityCollectionService;

            this._query = ProxyQueryManager.Current.Instance <ProductCollectionTreeQuery>();

            var providerKey = Constants.ProviderKeys.EntityCollection.StaticProductCollectionProviderKey;

            root1 = _service.CreateEntityCollectionWithKey(EntityType.Product, providerKey, "root1", false);

            root2 = _service.CreateEntityCollectionWithKey(EntityType.Product, providerKey, "root2", false);

            a           = _service.CreateEntityCollection(EntityType.Product, providerKey, "a", false);
            a.ParentKey = root1.Key;

            b           = _service.CreateEntityCollection(EntityType.Product, providerKey, "b", false);
            b.ParentKey = root1.Key;

            c           = _service.CreateEntityCollection(EntityType.Product, providerKey, "c", false);
            c.ParentKey = root1.Key;

            _service.Save(new [] { a, b, c });

            a1           = _service.CreateEntityCollection(EntityType.Product, providerKey, "a1", false);
            a1.ParentKey = a.Key;

            a2           = _service.CreateEntityCollection(EntityType.Product, providerKey, "a2", false);
            a2.ParentKey = a.Key;

            _service.Save(new[] { a1, a2 });

            a1a           = _service.CreateEntityCollection(EntityType.Product, providerKey, "a1a", false);
            a1a.ParentKey = a1.Key;


            a1b           = _service.CreateEntityCollection(EntityType.Product, providerKey, "a1b", false);
            a1b.ParentKey = a1.Key;

            _service.Save(new[] { a1a, a1b });


            c1           = _service.CreateEntityCollection(EntityType.Product, providerKey, "c1", false);
            c1.ParentKey = c.Key;

            c2           = _service.CreateEntityCollection(EntityType.Product, providerKey, "c2", false);
            c2.ParentKey = c.Key;

            _service.Save(new[] { c1, c2 });

            c2a           = _service.CreateEntityCollection(EntityType.Product, providerKey, "c2a", false);
            c2a.ParentKey = c2.Key;

            _service.Save(c2a);

            _merchello = new MerchelloHelper();
        }
        public override void FixtureSetup()
        {
            base.FixtureSetup();

            DbPreTestDataWorker.DeleteAllEntityCollections();

            _service = MerchelloContext.Current.Services.EntityCollectionService;

            this._query = ProxyQueryManager.Current.Instance<ProductCollectionTreeQuery>();

            var providerKey = Constants.ProviderKeys.EntityCollection.StaticProductCollectionProviderKey;

            root1 = _service.CreateEntityCollectionWithKey(EntityType.Product, providerKey, "root1", false);

            root2 = _service.CreateEntityCollectionWithKey(EntityType.Product, providerKey, "root2", false);

            a = _service.CreateEntityCollection(EntityType.Product, providerKey, "a", false);
            a.ParentKey = root1.Key;

            b = _service.CreateEntityCollection(EntityType.Product, providerKey, "b", false);
            b.ParentKey = root1.Key;

            c = _service.CreateEntityCollection(EntityType.Product, providerKey, "c", false);
            c.ParentKey = root1.Key;

            _service.Save(new [] { a, b, c });

            a1 = _service.CreateEntityCollection(EntityType.Product, providerKey, "a1", false);
            a1.ParentKey = a.Key;

            a2 = _service.CreateEntityCollection(EntityType.Product, providerKey, "a2", false);
            a2.ParentKey = a.Key;

            _service.Save(new[] { a1, a2 });

            a1a = _service.CreateEntityCollection(EntityType.Product, providerKey, "a1a", false);
            a1a.ParentKey = a1.Key;

            a1b = _service.CreateEntityCollection(EntityType.Product, providerKey, "a1b", false);
            a1b.ParentKey = a1.Key;

            _service.Save(new[] { a1a, a1b });

            c1 = _service.CreateEntityCollection(EntityType.Product, providerKey, "c1", false);
            c1.ParentKey = c.Key;

            c2 = _service.CreateEntityCollection(EntityType.Product, providerKey, "c2", false);
            c2.ParentKey = c.Key;

            _service.Save(new[] { c1, c2 });

            c2a = _service.CreateEntityCollection(EntityType.Product, providerKey, "c2a", false);
            c2a.ParentKey = c2.Key;

            _service.Save(c2a);

            _merchello = new MerchelloHelper();
        }