Exemplo n.º 1
0
        public NetworkAgentTest()
        {
            _mock = new Mock <INetworkMetricsRepository>();
            var logger = new Mock <ILogger <NetworkMetricsAgentController> >();
            var mapper = new Mock <IMapper>();

            _controller = new NetworkMetricsAgentController(logger.Object, _mock.Object, mapper.Object);
        }
        public NetworkMetricsAgentControllerTests()
        {
            var config = new MapperConfiguration(cfg => cfg.CreateMap <NetworkMetricModel, NetworkMetricDto>());

            _mapper     = config.CreateMapper();
            _logger     = new Mock <ILogger <NetworkMetricsAgentController> >();
            _repository = new Mock <INetworkMetricsRepository>();
            _controller = new NetworkMetricsAgentController(_mapper, _repository.Object, _logger.Object);
        }
        public NetworkControllerUnitTests()
        {
            _mock = new Mock <INetworkMetricsRepository>();

            _controller = new NetworkMetricsAgentController(_mock.Object, _logger);
        }
Exemplo n.º 4
0
 public NetworkMetricsAgentControllerUnitTests()
 {
     _loggerMock = new Mock <ILogger <NetworkMetricsAgentController> >();
     _networkMetricsAgentRepositoryMock = new Mock <IRepository <NetworkMetric> >();
     _controller = new NetworkMetricsAgentController(_loggerMock.Object, _networkMetricsAgentRepositoryMock.Object);
 }