public JewelCartItem(int id, JewelMediaType mediaType, decimal price) { type = CartItemType.Jewelry; jewelID = id; this.mediaType = mediaType; this.price = price; }
public JewelCartItem(int id, JewelMediaType mediaType, decimal price) { type = CartItemType.Jewelry; jewelID = id; this.mediaType = mediaType; this.price = price; }
private void Start() { cartItemType = GetComponent <CartItemType>(); if (cartItemType == null) { throw new NullReferenceException("GameObject muse have a Cart Item Type component"); } }
public static ICartItem StubCartItem(int id, decimal price, CartItemType type) { var cartItem = MockRepository.GenerateMock <ICartItem>(); cartItem.Stub(x => x.ID).Return(id); cartItem.Stub(x => x.Price).Return(price); cartItem.Stub(x => x.Type).Return(type); return(cartItem); }
public CustomJewelCartItem(int diamondID, int settingID, string size, JewelMediaType mediaType, decimal price) { this.diamondID = diamondID; this.settingID = settingID; this.size = size; this.mediaType = mediaType; this.price = price; this.id = diamondID * 3 + settingID * 7; this.type = CartItemType.CustomJewel; }
public CustomJewelCartItem(int diamondID, int settingID, string size, JewelMediaType mediaType, decimal price) { this.diamondID = diamondID; this.settingID = settingID; this.size = size; this.mediaType = mediaType; this.price = price; this.id = diamondID*3 + settingID*7; this.type = CartItemType.CustomJewel; }
public static ICartItem StubCartItem(int id, decimal price, CartItemType type) { var cartItem = MockRepository.GenerateMock<ICartItem>(); cartItem.Stub(x => x.ID).Return(id); cartItem.Stub(x => x.Price).Return(price); cartItem.Stub(x => x.Type).Return(type); return cartItem; }
/// <summary> /// /// </summary> /// <param name="itemId"></param> /// <param name="type"></param> /// <param name="capacity"></param> /// <returns></returns> public static CartItem Create(Guid itemId, int capacity, CartItemType type) { return new CartItem { ItemTypeId = itemId, ItemType = type.ToString(), MaxCapacity = capacity }; }