8
8
using Nop . Core . Domain . Discounts ;
9
9
using Nop . Core . Plugins ;
10
10
using Nop . Services . Catalog ;
11
- using Nop . Services . Common ;
12
11
using Nop . Services . Discounts ;
13
12
using Nop . Services . Events ;
14
13
using Nop . Services . Localization ;
@@ -25,12 +24,10 @@ public class DiscountServiceTests : ServiceTest
25
24
private IRepository < DiscountRequirement > _discountRequirementRepo ;
26
25
private IRepository < DiscountUsageHistory > _discountUsageHistoryRepo ;
27
26
private IEventPublisher _eventPublisher ;
28
- private IGenericAttributeService _genericAttributeService ;
29
27
private ILocalizationService _localizationService ;
30
28
private ICategoryService _categoryService ;
31
29
private IDiscountService _discountService ;
32
30
private IStoreContext _storeContext ;
33
- private IWorkContext _workContext ;
34
31
35
32
[ SetUp ]
36
33
public new void SetUp ( )
@@ -67,20 +64,18 @@ public class DiscountServiceTests : ServiceTest
67
64
_eventPublisher . Expect ( x => x . Publish ( Arg < object > . Is . Anything ) ) ;
68
65
69
66
_storeContext = MockRepository . GenerateMock < IStoreContext > ( ) ;
70
- _workContext = null ;
71
67
72
68
var cacheManager = new NopNullCache ( ) ;
73
69
_discountRequirementRepo = MockRepository . GenerateMock < IRepository < DiscountRequirement > > ( ) ;
74
70
_discountRequirementRepo . Expect ( x => x . Table ) . Return ( new List < DiscountRequirement > ( ) . AsQueryable ( ) ) ;
75
71
76
72
_discountUsageHistoryRepo = MockRepository . GenerateMock < IRepository < DiscountUsageHistory > > ( ) ;
77
73
var pluginFinder = new PluginFinder ( ) ;
78
- _genericAttributeService = MockRepository . GenerateMock < IGenericAttributeService > ( ) ;
79
74
_localizationService = MockRepository . GenerateMock < ILocalizationService > ( ) ;
80
75
_categoryService = MockRepository . GenerateMock < ICategoryService > ( ) ;
81
76
_discountService = new DiscountService ( cacheManager , _discountRepo , _discountRequirementRepo ,
82
77
_discountUsageHistoryRepo , _storeContext ,
83
- _localizationService , _categoryService , pluginFinder , _eventPublisher , _workContext ) ;
78
+ _localizationService , _categoryService , pluginFinder , _eventPublisher ) ;
84
79
}
85
80
86
81
[ Test ]
0 commit comments