public HddMetricsControllerUnitTests() { mockRepository = new Mock <IHddMetricsRepository>(); mockLogger = new Mock <ILogger <HddMetricsController> >(); mapper = new Mapper(new MapperConfiguration(cfg => cfg.AddProfile(new MapperProfile()))); controller = new HddMetricsController(mockLogger.Object, mockRepository.Object, mapper); }
public HddMetricsUnitTests() { _logger = new Mock <ILogger <HddMetricsController> >(); _mock = new Mock <IHddMetricsRepository>(); _imapper = new Mock <IMapper>(); _controller = new HddMetricsController(_mock.Object, _logger.Object, _imapper.Object); }
public HddMetricsControllerUnitTests() { _mock = new Mock <IRepository <HddMetric> >(); _logger = new Mock <ILogger <HddMetricsController> >(); _mapper = new Mock <IMapper>(); _controller = new HddMetricsController(_logger.Object, _mock.Object, _mapper.Object); }
public HddControllerUnitTests() { _mockMapper = new Mock <IMapper>(); _mockRepository = new Mock <IHddMetricsRepository>(); _mockLogger = new Mock <ILogger <HddMetricsController> >(); _controller = new HddMetricsController(_mockRepository.Object, _mockLogger.Object, _mockMapper.Object); }
public HddControllerUnitTests() { repository = new Mock <IHddMetricsRepository>(); logger = new Mock <ILogger <HddMetricsController> >(); mapper = new Mock <IMapper>(); controller = new HddMetricsController(repository.Object, logger.Object, mapper.Object); }
public HddMetricsAgentControllersTest() { loggerMock = new Mock <ILogger <HddMetricsController> >(); repositoryMock = new Mock <IHddMetricsRepository>(); mapperMock = new Mock <IMapper>(); configurationMock = new Mock <IConfiguration>(); controller = new HddMetricsController(loggerMock.Object, repositoryMock.Object, mapperMock.Object, configurationMock.Object); }
public HddMetricsControllerUnitTests() { _mock = new Mock <IHddMetricsRepository>(); var logger = new Mock <ILogger <HddMetricsController> >(); var mapper = new Mock <IMapper>(); _controller = new HddMetricsController(logger.Object, _mock.Object, mapper.Object); }
public HddControllerUnitTests() { _repositoryMock = new Mock <IHddMetricsRepository>(); _loggerMock = new Mock <ILogger <HddMetricsController> >(); _mapperMock = new Mock <IMapper>(); _controller = new HddMetricsController(_repositoryMock.Object, _loggerMock.Object, _mapperMock.Object); }
public HddMetricsControllerUnitTests() { var config = new MapperConfiguration(cfg => cfg.CreateMap <HddMetricModel, HddMetricManagerDto>()); _mapper = config.CreateMapper(); _logger = new Mock <ILogger <HddMetricsController> >(); _repository = new Mock <IHddMetricsRepository>(); _controller = new HddMetricsController(_mapper, _repository.Object, _logger.Object); }
public HddMetricsControllersTest() { _loggerMock = new Mock <ILogger <HddMetricsController> >(); _repositoryMock = new Mock <IHddMetricsRepository>(); var config = new MapperConfiguration(mp => mp.AddProfile(new MapperProfile())); IMapper mapper = config.CreateMapper(); _controller = new HddMetricsController(_loggerMock.Object, _repositoryMock.Object, mapper); }
public HddControllerUnitTests() { _mock = new Mock <IHddMetricsRepository>(); _logger = new Mock <ILogger <HddMetricsController> >(); var config = new MapperConfiguration(cfg => cfg.CreateMap <HddMetric, HddMetricDto>()); IMapper mapper = config.CreateMapper(); _controller = new HddMetricsController(mapper, _mock.Object, _logger.Object); }
public HddMetricsControllerUnitTest() { var logger = new Mock <ILogger>(); var mapper = new Mock <IMapper>(); _mock = new Mock <IHddMetricsRepository>(); _controller = new HddMetricsController(_mock.Object, logger.Object, mapper.Object); _time = new DateTimeOffset(2021, 06, new Random().Next(1, 30), new Random().Next(0, 24), new Random().Next(0, 60), 00, TimeSpan.Zero); }
public UnitTest1() { cpuController = new CpuMetricsController(); dotnetController = new DotnetMetricsController(); hddController = new HddMetricsController(); networkController = new NetworkMetricsController(); ramController = new RamMetricsController(); fromTime = TimeSpan.FromSeconds(0); toTime = TimeSpan.FromSeconds(100); }
public HddMetricsControllerUnitTest() { var log = LogManager.GetCurrentClassLogger(); _controller = new HddMetricsController(log); _agentId = new Random().Next(1, 9999999); _fromTime = new DateTimeOffset(2021, 06, new Random().Next(1, 30), new Random().Next(0, 24), new Random().Next(0, 60), 00, TimeSpan.Zero); _toTime = new DateTimeOffset(2021, 06, new Random().Next(1, 30), new Random().Next(0, 24), new Random().Next(0, 60), 00, TimeSpan.Zero); }
public HddMetricsControllerUnitTests() { _mock = new Mock <IHddMetricsRepository>(); _imapper = new Mock <IMapper>(); var config = new MapperConfiguration(cfg => cfg.CreateMap <HddMetrics, HddMetricsDto>()); var mapper = config.CreateMapper(); _metricsAgentClient = new Mock <IMetricsAgentClient>(); _logger = new Mock <ILogger <HddMetricsController> >(); _controller = new HddMetricsController(_mock.Object, _metricsAgentClient.Object, _logger.Object, mapper); }
public HddControllerUnitTests() { mockRepository = new Mock <IHddMetricsRepository>(); mockLogger = new Mock <ILogger <HddMetricsController> >(); if (_mapper == null) { var mappingConfig = new MapperConfiguration(mc => { mc.AddProfile(new MapperProfile()); }); IMapper mapper = mappingConfig.CreateMapper(); _mapper = mapper; } controller = new HddMetricsController(mockLogger.Object, mockRepository.Object, _mapper); }
public HddControllerUnitTests() { mockLogger = new Mock <ILogger <HddMetricsController> >(); mockRepository = new Mock <IHddMetricsRepository>(); mockAgentsRepository = new Mock <IAgentsRepository>(); var myProfile = new MapperProfile(); var configuration = new MapperConfiguration(cfg => cfg.AddProfile(myProfile)); var mapper = new Mapper(configuration); controller = new HddMetricsController( mockLogger.Object, mockRepository.Object, mockAgentsRepository.Object, mapper); }
public HddControllerUnitTests() { _controller = new HddMetricsController(_logger, _repository); }
public HddControllerUnitTests() { _mock = new Mock <HddMetricsController>(); _logger = new Mock <ILogger <HddMetricsController> >(); _controller = new HddMetricsController(_logger.Object); }
public HddMetricsControllerUnitTests() { _mockLogger = new Mock <ILogger <HddMetricsController> >(); _mockMediator = new Mock <IMediator>(); _controller = new HddMetricsController(_mockLogger.Object, _mockMediator.Object); }
public HddMetricTimeToTimeTests() { mock = new Mock <IHddMetricsRepository>(); logger = new Mock <ILogger <HddMetricsController> >(); controller = new HddMetricsController(logger.Object, mock.Object, _mapper); }
public HddControllerUnitTest() { _controller = new HddMetricsController(); }
public HddMetricsControllerUnitTests() { mock = new Mock <IHddMetricsRepository>(); controller = new HddMetricsController(mock.Object); }
public HddControllerUnitTests() { var loggerMock = new Mock<ILogger<HddMetricsController>>(); _controller = new HddMetricsController(loggerMock.Object); }
public HddControllerUnitTests() { logger = new Mock <ILogger <HddMetricsController> >(); controller = new HddMetricsController(logger.Object); }
public HddMetricControllerUnitTests() { mock = new Mock <IHddMetricsRepository>(); _logger = new Mock <ILogger <HddMetricsController> >(); controller = new HddMetricsController(_logger.Object, mock.Object, _mapper); }