Пример #1
0
        public Mock <IServiceProvider> GetServiceProvider(IWarpTypeRepository repository)
        {
            var spMock = new Mock <IServiceProvider>();

            spMock.Setup(s => s.GetService(typeof(IWarpTypeRepository)))
            .Returns(repository);

            return(spMock);
        }
Пример #2
0
 public WarpTypeService(IServiceProvider serviceProvider)
 {
     _repository = serviceProvider.GetService <IWarpTypeRepository>();
 }