DiscountService class will handle all service type requests
Inheritance: IDiscountService
コード例 #1
0
 public static IDiscountService GetInstance()
 {
     if (discountService == null)
     {
         discountService = new DiscountService();
     }
     return discountService;
 }
コード例 #2
0
 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;
 }