Skip to content

Commit

Permalink
Fixed errors on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
skoshelev committed Feb 16, 2018
1 parent bddf077 commit f89d639
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -263,7 +263,8 @@ public AdminMapperConfiguration()
.ForMember(dest => dest.Locales, mo => mo.Ignore())
.ForMember(dest => dest.SeName, mo => mo.MapFrom(src => src.GetSeName(0, true, false)))
.ForMember(dest => dest.CustomProperties, mo => mo.Ignore())
.ForMember(dest => dest.Form, mo => mo.Ignore());
.ForMember(dest => dest.Form, mo => mo.Ignore())
.ForMember(dest => dest.VendorAttributes, mo => mo.Ignore());
CreateMap<VendorModel, Vendor>()
.ForMember(dest => dest.VendorNotes, mo => mo.Ignore())
.ForMember(dest => dest.Deleted, mo => mo.Ignore());
Expand Down
Expand Up @@ -12,6 +12,7 @@
using Nop.Core.Domain.Stores;
using Nop.Core.Infrastructure;
using Nop.Services.Catalog;
using Nop.Services.Directory;
using Nop.Services.Discounts;
using Nop.Tests;
using NUnit.Framework;
Expand Down Expand Up @@ -74,6 +75,12 @@ public new void SetUp()
var httpContextAccessor = MockRepository.GenerateMock<IHttpContextAccessor>();
serviceProvider.Expect(x => x.GetRequiredService(typeof(IHttpContextAccessor))).Return(httpContextAccessor);
serviceProvider.Expect(x => x.GetRequiredService(typeof(IWorkContext))).Return(_workContext);

serviceProvider.Expect(x => x.GetRequiredService(typeof(CurrencySettings))).Return(new CurrencySettings{PrimaryStoreCurrencyId = 1});
var currencyService = MockRepository.GenerateMock<ICurrencyService>();
currencyService.Expect(x => x.GetCurrencyById(1)).Return(new Currency {Id = 1, RoundingTypeId = 0});
serviceProvider.Expect(x => x.GetRequiredService(typeof(ICurrencyService))).Return(currencyService);

nopEngine.Expect(x => x.ServiceProvider).Return(serviceProvider);
EngineContext.Replace(nopEngine);
}
Expand Down

0 comments on commit f89d639

Please sign in to comment.