DiscountService class will handle all service type requests
Inheritance: IDiscountService
示例#1
0
 public static IDiscountService GetInstance()
 {
     if (discountService == null)
     {
         discountService = new DiscountService();
     }
     return discountService;
 }
 public void Setup()
 {
     couponList = new List<UserDiscount>();
     discountService = (DiscountService)DiscountService.GetInstance();
     userDiscount = User_DiscountTest.CreateCoupon();
     couponList.Add(coupon);
     isSuccess = false;
     error = null;
     discountService.couponUtility = mockUserDiscountUtility.Object;
     discountService.dbContext = mockContext.Object;
 }