Пример #1
0
        public DeviceTypesControllerTests()
        {
            _mockDevTypeSer  = new Mock <IDeviceTypeService>();
            _mockDevTypeRepo = new Mock <IDeviceTypeRepository>();

            var mockMapper = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new AutoMapperProfiles());
            });
            var mapper = mockMapper.CreateMapper();

            _deviceTypesController = new DeviceTypesController(_mockDevTypeSer.Object, mapper);
        }
 public DeviceTypesControllerTests()
 {
     deviceTypeLogic       = new DeviceTypeLogic(new SampleDeviceTypeRepository());
     deviceTypesController = new DeviceTypesController(deviceTypeLogic);
     deviceTypesController.InitializeRequest();
 }