Пример #1
0
 public CanaryController(IFitbitService fitbitService, IWithingsService withingsService, ISheetsService sheetsService, IHealthRepository healthRepository)
 {
     _fitbitService    = fitbitService;
     _withingsService  = withingsService;
     _sheetsService    = sheetsService;
     _healthRepository = healthRepository;
 }
Пример #2
0
 public HealthService(
     ILogger logger,
     IHealthRepository healthRepository)
 {
     _logger           = logger;
     _healthRepository = healthRepository;
 }
 public HealthService(IMapper iMapper, IHealthRepository healthRepository, IFacultystaffInfoRepository facultystaffInfoRepository, IStudentInfoRepository studentInfoRepository)
 {
     _IMapper = iMapper;
     this.healthRepository           = healthRepository;
     this.facultystaffInfoRepository = facultystaffInfoRepository;
     this.studentInfoRepository      = studentInfoRepository;
 }
        public void HealthRepository_GetHealthRecord_ValidCall()
        {
            //Arrange
            List <Health> healthList = CreateTestData.GetListOfHealth();
            var           mockSet    = new Mock <DbSet <Health> >()
                                       .SetupData(healthList, o =>
            {
                return(healthList.Single(x => x.Character_id.CompareTo(o.First()) == 0));
            });

            using (var mockContext = AutoMock.GetLoose())
            {
                var expected = CreateTestData.GetSampleHealth();
                var id       = expected.Character_id;

                mockContext.Mock <CharacterContext>()
                .Setup(x => x.Set <Health>()).Returns(mockSet.Object);

                //Act
                IHealthRepository toTest = mockContext.Create <HealthRepository>();
                var actual = toTest.Get(id);

                actual.Should().NotBeNull();
                expected.Should().NotBeNull();
                actual.Should().BeOfType <Health>();
                expected.Should().BeOfType <Health>();
                actual.Should().BeEquivalentTo(expected);
            }
        }
Пример #5
0
 public HealthController(IMemoryCache cache, IOptionsSnapshot <Lab8Settings> settings, IHealthRepository HealthRepo,
                         RoleManager <IdentityRole> roleManager, UserManager <Lab8Model> userManager)
 {
     _Settings   = settings.Value;
     _Cache      = cache;
     _HealthRepo = HealthRepo;
     RoleManager = roleManager;
     UserManager = userManager;
 }
Пример #6
0
 public HealthController(IUserRepository userRepository, IHealthRepository healthRepository, IMapper mapper)
 {
     _userRepository   = userRepository;
     _healthRepository = healthRepository;
     _mapper           = mapper;
 }
Пример #7
0
 public HealthService(IHealthRepository repository, IHealthNotification healthHub)
 {
     _repository = repository;
     _healthHub  = healthHub;
 }
Пример #8
0
 public HealthService(IServiceContext context, IHealthRepository repository)
     : base(context)
 {
     Repository = repository ?? throw new ArgumentNullException(nameof(repository));
 }
 public HealthController(IHealthRepository healthRepository)
 {
     _healthRepository = healthRepository;
 }
Пример #10
0
 public HealthService(IHealthRepository healthRepository, ICacheProvider cacheProvider, IRabbitOutboundQueueProvider rabbitOutboundQueueProvider)
 {
     _healthRepository            = healthRepository;
     _cacheProvider               = cacheProvider;
     _rabbitOutboundQueueProvider = rabbitOutboundQueueProvider;
 }
Пример #11
0
		public HealthService(IHealthRepository healthRepository, ICacheProvider cacheProvider)
		{
			_healthRepository = healthRepository;
			_cacheProvider = cacheProvider;
		}
 public DashboardController(IHealthRepository healthRepository)
 {
     _healthRepository = healthRepository;
 }