public void CanCastConcreteLinqRepositoryToInterfaceILinqRepository() { LinqRepository <MyEntity> concreteRepository = new LinqRepository <MyEntity>(); ILinqRepository <MyEntity> castRepository = concreteRepository as ILinqRepository <MyEntity>; castRepository.ShouldNotBeNull(); }
public SearchTasks( ILinqRepository<Assertion> assertionRepository, ILinqRepository<Tag> tagRepository) { this.assertionRepository = assertionRepository; this.tagRepository = tagRepository; }
public SearchTasks( ILinqRepository <Assertion> assertionRepository, ILinqRepository <Tag> tagRepository) { this.assertionRepository = assertionRepository; this.tagRepository = tagRepository; }
public void EachTestSetUp() { _passwordHashingService = Substitute.For<IPasswordHashingService>(); _passwordHashingService.ComputeHash("somestring", new byte[4]).ReturnsForAnyArgs("hashedPassword"); _userRepository = Substitute.For<ILinqRepository<User>>(); _authService = new AuthenticationService(_userRepository, _passwordHashingService); }
protected override void OnSetup() { base.OnSetup(); Repository = RepositoryFactory(); SessionFactory.Statistics.Clear(); }
public AdminController(ILinqRepository<RentalProperty> propertyRepository, ILinqRepository<User> userRepository, ILinqRepository<Agent> agentRepository) { _propertyRepository = propertyRepository; _userRepository = userRepository; _agentRepository = agentRepository; }
public HomeController(IAuthenticationService authenticationService, ILinqRepository<Agent> agentRepository, ILinqRepository<User> userRepository) { _authenticationService = authenticationService; _agentRepository = agentRepository; _userRepository = userRepository; }
public void wrong_email_address_cannot_log_in() { _userRepository = Substitute.For<ILinqRepository<User>>(); _authService = new AuthenticationService(_userRepository, _passwordHashingService); var result = _authService.Login("invalidAddress", "SomePassword"); Assert.AreEqual(LoginResult.unsuccessful, result); }
public AgentManagementController(ILinqRepository<Agent> agentRepository, ILinqRepository<User> userRepository, ILinqRepository<Office> officeRepository, ILinqRepository<RentalProperty> propertyRepository) { _agentRepository = agentRepository; _userRepository = userRepository; _officeRepository = officeRepository; _propertyRepository = propertyRepository; }
public ProfileTasks( ILinqRepository<Profile> profileRepository, ILinqRepository<Tag> tagRepository, ILinqRepository<Category> categoryRepository) { this.profileRepository = profileRepository; this.tagRepository = tagRepository; this.categoryRepository = categoryRepository; }
public ProfileTasks( ILinqRepository <Profile> profileRepository, ILinqRepository <Tag> tagRepository, ILinqRepository <Category> categoryRepository) { this.profileRepository = profileRepository; this.tagRepository = tagRepository; this.categoryRepository = categoryRepository; }
public BasicService(IServiceProvider provider, ILinqRepository <T> _repo) { provider.Should().NotBeNull(); _repo.Should().NotBeNull(); this._provider = provider; this._repo = _repo; this._logger = provider.Resolve_ <ILogger <BasicService <T> > >(); }
/// <summary> /// Creates AnnouncementController. /// </summary> /// <param name="announcementRepository">Announcements repository.</param> public AnnouncementsController([NotNull] ILinqRepository <Announcement> announcementRepository, #if NETCOREAPP3_1 LinkGenerator linkGenerator, #endif [NotNull] IMapper mapper) { _announcementRepository = announcementRepository ?? throw new ArgumentNullException(nameof(announcementRepository)); #if NETCOREAPP3_1 _linkGenerator = linkGenerator ?? throw new ArgumentNullException(nameof(linkGenerator)); #endif _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public CategoryTasks(ILinqRepository <Category> categoryRepository) { this.categoryRepository = categoryRepository; }
public AuthenticationService(ILinqRepository<User> userRepository, IPasswordHashingService passwordHashingService) { _passwordHashingService = passwordHashingService; _userRepository = userRepository; }
protected override void OnTeardown() { Repository = null; base.OnTeardown(); }
/// <summary> /// 构造函数。 /// </summary> /// <param name="dependency">依赖注入。</param> /// <param name="users">用户信息。</param> /// <param name="linqUsers">用户。</param> public ValuesController(IDependency dependency, UserRepository users, ILinqRepository <FeiUsers, int> linqUsers) { this.dependency = dependency; dependency.AopTest(); }
public UserService(IHttpContextService context, ILinqRepository<Parent> parentRepository, ILinqRepository<User> userRepository) { this.context = context; this.parentRepository = parentRepository; this.userRepository = userRepository; }
public RentalPropertyController(ILinqRepository<RentalProperty> propertyRepository, ILinqRepository<User> userRepository) { _propertyRepository = propertyRepository; _userRepository = userRepository; }
public AgentManagementController(ILinqRepository<Agent> agentRepository, ILinqRepository<User> userRepository) { _agentRepository = agentRepository; _userRepository = userRepository; }
public UserService(IHttpContextService context, ILinqRepository <Parent> parentRepository, ILinqRepository <User> userRepository) { this.context = context; this.parentRepository = parentRepository; this.userRepository = userRepository; }
/// <summary> /// Creates AnnouncementController. /// </summary> /// <param name="announcementRepository">Announcements repository.</param> public AnnouncementsController(ILinqRepository <Announcement> announcementRepository) { this.announcementRepository = announcementRepository; Debug.WriteLine("Created Announcements controller {0:x}", GetHashCode()); }
public TagTasks(ILinqRepository <Tag> tagRepository) { this.tagRepository = tagRepository; }
public TagTasks(ILinqRepository<Tag> tagRepository) { this.tagRepository = tagRepository; }
public CategoryTasks(ILinqRepository<Category> categoryRepository) { this.categoryRepository = categoryRepository; }
public UserService(IHttpContextService context, ILinqRepository <Parent, int> parentRepository, ILinqRepository <User, int> userRepository) { _context = context; _parentRepository = parentRepository; _userRepository = userRepository; }
public EditAction(ILinqRepository <NugetPackage, long> repository, IMappingEngine mappingEngine) { _repository = repository; _mappingEngine = mappingEngine; }
/// <summary> /// Creates AnnouncementController. /// </summary> /// <param name="announcementRepository">Announcements repository.</param> public AnnouncementsController(ILinqRepository<Announcement> announcementRepository) { this.announcementRepository = announcementRepository; Debug.WriteLine("Created Announcements controller {0:x}", GetHashCode()); }
public AuthenticationController(IAuthenticationService authenticationService, ILinqRepository<User> userRepository) { _authenticationService = authenticationService; _userRepository = userRepository; }