Esempio n. 1
0
 public IpController(IValidator <DomainRequest> ipRequestValidator, IErrorMapper errorMapper, IDomainService domainService,
                     IConfiguration iConfig, IIPMapper ipMapper, IDnsMapper idnsMapper, IPingMapper ipingMapper, IRdapMapper irdapMapper)
 {
     //_logger = logger;
     _ipRequestValidator = ipRequestValidator;
     _errorMapper        = errorMapper;
     _domainService      = domainService;
     _configuration      = iConfig;
     _ipMapper           = ipMapper;
     _idnsMapper         = idnsMapper;
     _ipingMapper        = ipingMapper;
     _irdapMapper        = irdapMapper;
 }
        public IpControllerTest()
        {
            _domainService      = new DomainService();
            _ipRequestValidator = new DomainValidator();
            _ipMapper           = new IPMapper();
            _errorMapper        = new ErrorMapper();
            _ipingMapper        = new PingMapper();
            _idnsMapper         = new DnsMapper();
            _irdapMapper        = new RdapMapper();
            _ipController       = new IpController(_ipRequestValidator, _errorMapper, _domainService
                                                   , _iconfig, _ipMapper, _idnsMapper, _ipingMapper, _irdapMapper);


            _ipController.ControllerContext             = new ControllerContext();
            _ipController.ControllerContext.HttpContext = new DefaultHttpContext();
        }