public CartItemManagerTests() { _cartModel = new CartModel(); Session.Transact(session => session.SaveOrUpdate(_productVariant)); _getUserGuid = A.Fake <IGetUserGuid>(); _cartBuilder = A.Fake <ICartBuilder>(); A.CallTo(() => _cartBuilder.BuildCart()).Returns(_cartModel); _cartItemManager = new CartItemManager(_cartBuilder, Session, _getUserGuid); }
public DatabaseConnection(ConnectionType type, string connection = null) { database = DatabaseFactory.GetDatabase(type, connection); ArtistManager = new ArtistManager(DatabaseFactory.GetDatabase(type, connection)); ProductManager = new ProductManager(DatabaseFactory.GetDatabase(type, connection)); UserManager = new UserManager(DatabaseFactory.GetDatabase(type, connection)); OrderManager = new OrderManager(DatabaseFactory.GetDatabase(type, connection)); CartManager = new CartManager(DatabaseFactory.GetDatabase(type, connection)); CartItemManager = new CartItemManager(DatabaseFactory.GetDatabase(type, connection)); OrderNumberManager = new OrderNumberManager(DatabaseFactory.GetDatabase(type, connection)); }
private void OnTriggerEnter(Collider cart) { if (IsTargetCollider(cart)) { cartItemManager = cartPickUpSystem.itemManager; productsInCart = cartItemManager.ReturnCartProducts(); if (cartItemManager.IsAnyProductChecked()) { cartPickUpSystem.canvasBuyItems.SetActive(true); } } }
public UnitOfWork(ApplicationDbContext context) { this.context = context; Products = new ProductManager(context); Categories = new CategoryManager(context); Images = new ImageManager(context); Orders = new OrderManager(context); Payments = new PaymentTypeManager(context); Tags = new TagManager(context); CartItems = new CartItemManager(context); ProductPayments = new ProductPaymentsManager(context); ProductTag = new ProductTagsManager(context); OrderProduct = new OrderProductManager(context); }
private void Awake() { gameObject.AddComponent <CartItemManager>(); itemManager = gameObject.GetComponent <CartItemManager>(); }