public AdminController(IIndividualService individualService, IOrganizationService organizationService, IEventService eventService, IMapper mapper) { this.individualService = individualService; this.organizationService = organizationService; this.eventService = eventService; this.mapper = mapper; }
public AssociateController( IMembershipService membershipService, IMembershipService associateMembershipService, IAssociateService associateService, IDocumentService documentService, IReferenceService referenceService, IEmployeeService employeeService, IProspectService prospectService, IPrincipal user, IClientProjectSharedService clientProjectSharedService, IIndividualService individualService, IRoleService roleService, Admin.Services.IEmailService emailService) : base(membershipService, associateService, user) { this.associateService = associateService; this.documentService = documentService; this.referenceService = referenceService; this.employeeService = employeeService; this.prospectService = prospectService; this.associateMembershipService = associateMembershipService; this.clientProjectSharedService = clientProjectSharedService; this.individualService = individualService; this.roleService = roleService; this.emailService = emailService; }
public UseDatabaseInExistingContainer( IIndividualService individualService, IDockerizedContextFactory dockerizedContextFactory) { _individualService = individualService; _dockerizedContextFactory = dockerizedContextFactory; }
public InteractionService(IVerintConnection verint, IIndividualService individualService, IOrganisationService organisationService, ILogger <InteractionService> logger) { _verintConnection = verint.Client(); _individualService = individualService; _organisationService = organisationService; _logger = logger; }
public IndividualController() { var cache = Util.CreateCacheProvider(); var unitOfWork = Util.CreateUnitOfWork(cache); var serviceFactory = new FamilyTreeServiceFactory(unitOfWork, cache); _factService = serviceFactory.CreateFactService(); _familyService = serviceFactory.CreateFamilyService(); _individualService = serviceFactory.CreateIndividualService(); _treeService = serviceFactory.CreateTreeService(); }
public OrganizationService(IIndividualService individualService, IEfDbSetWrapper <Organization> organizationSetWrapper, IUnitOfWork dbContext) { Guard.WhenArgument(organizationSetWrapper, "organizationSetWrapper").IsNull().Throw(); Guard.WhenArgument(individualService, "individualService").IsNull().Throw(); Guard.WhenArgument(dbContext, "dbContext").IsNull().Throw(); this.organizationSetWrapper = organizationSetWrapper; this.dbContext = dbContext; this.individualService = individualService; }
public void ReturnNull_WhenIdIsNull() { // Arrange IIndividualService service = kernel.Get <IIndividualService>(); // Act Individual individual = service.GetById(null); // Assert Assert.IsNull(individual); }
public void ReturnNull_WhenThereIsNoModelWithThePassedId() { // Arrange IIndividualService service = kernel.Get <IIndividualService>(); // Act Individual individual = service.GetById(Guid.NewGuid()); // Assert Assert.IsNull(individual); }
public IndividualController(IIndividualService individualService, IMapper mapper, IPhotoHelper photoHelper, IUserProvider userProvider) { Guard.WhenArgument(individualService, "individualService").IsNull().Throw(); Guard.WhenArgument(mapper, "mapper").IsNull().Throw(); Guard.WhenArgument(photoHelper, "photoHelper").IsNull().Throw(); Guard.WhenArgument(userProvider, "userProvider").IsNull().Throw(); this.individualService = individualService; //this.imageService = imageService; this.mapper = mapper; this.photoHelper = photoHelper; this.userProvider = userProvider; }
public CaseService(IVerintConnection verint, ILogger <CaseService> logger, IInteractionService interactionService, CaseToFWTCaseCreateMapper caseToFWTCaseCreateMapper, IIndividualService individualService, ICacheProvider cacheProvider) { _logger = logger; _verintConnection = verint.Client(); _interactionService = interactionService; _caseToFWTCaseCreateMapper = caseToFWTCaseCreateMapper; _individualService = individualService; _cacheProvider = cacheProvider; }
public EventController(IEventService eventService, IIndividualService individualService, IOrganizationService organizationService, IMapper mapper, IPhotoHelper photoHelper) { Guard.WhenArgument(individualService, "individualService").IsNull().Throw(); Guard.WhenArgument(organizationService, "organizationService").IsNull().Throw(); Guard.WhenArgument(eventService, "eventService").IsNull().Throw(); Guard.WhenArgument(mapper, "mapper").IsNull().Throw(); Guard.WhenArgument(photoHelper, "photoHelper").IsNull().Throw(); this.individualService = individualService; this.organizationService = organizationService; this.eventService = eventService; this.mapper = mapper; this.photoHelper = photoHelper; }
public void ReturnModelWithCorrectProperties_WhenThereIsAModelWithThePassedId() { // Arrange IIndividualService service = kernel.Get <IIndividualService>(); // Act var result = service.GetById(dbIndividual.Id); // Assert Assert.IsNotNull(result); Assert.AreEqual(dbIndividual.Id, result.Id); Assert.AreEqual(dbIndividual.FirstName, result.FirstName); Assert.AreEqual(dbUser.UserName, result.User.UserName); }
public EventService(IEfDbSetWrapper <Event> eventsSetWrapper, IIndividualService individualService, IOrganizationService organizationService, IUnitOfWork dbContext) { Guard.WhenArgument(eventsSetWrapper, "EventsSetWrapper").IsNull().Throw(); Guard.WhenArgument(individualService, "individualService").IsNull().Throw(); Guard.WhenArgument(organizationService, "organizationService").IsNull().Throw(); Guard.WhenArgument(dbContext, "dbContext").IsNull().Throw(); this.dbContext = dbContext; this.eventsSetWrapper = eventsSetWrapper; this.individualService = individualService; this.organizationService = organizationService; }
public IndividualList() { // Get required service this.individualService = DependencyResolver.Kernel.Get <IIndividualService>(); // Initialize form components InitializeComponent(); this.DataContext = this; Thread displayThread = new Thread(() => PopulateData()); displayThread.IsBackground = true; displayThread.Start(); }
public FamilyTreeServiceFactory(IUnitOfWork unitOfWork, ICacheProvider cache) { Requires.NotNull(unitOfWork); Requires.NotNull(cache); _citationService = new CitationService(unitOfWork); _familyService = new FamilyService(unitOfWork); _individualService = new IndividualService(unitOfWork); _factService = new FactService(unitOfWork); _multimediaService = new MultimediaLinkService(unitOfWork); _noteService = new NoteService(unitOfWork); _repositoryService = new RepositoryService(unitOfWork); _sourceService = new SourceService(unitOfWork); _treeService = new TreeService(unitOfWork); }
public async Task GetIndividualsAsync_succeeds() { // Arrange var individuals = new List <Individual>() { new Individual() { Id = 1, FirstName = "Bob", MiddleName = "Bob", LastName = "Aran", Email = "*****@*****.**", Address = new List <Address>() { new Address() { AddressLine1 = "123 easy st", AddressLine2 = "Apt 5", City = "Baltimore", State = "MD", Zip = "21250", Id = 2, IndividualId = 1 } } } }; var mockRepo = new Mock <IIndividualRepository>(); mockRepo.Setup(x => x.GetIndividualsAsync() ).ReturnsAsync(individuals); _individualServiceSut = new IndividualService(mockRepo.Object); // Act var result = await _individualServiceSut.GetIndividualsAsync(); // Assert Assert.IsNotNull(result); }
/// <summary> /// IndividualAddEdit constructor /// </summary> /// <param name="IndividualViewModel"></param> public IndividualAddEdit(IndividualViewModel IndividualViewModel) { // Initialize service this.individualService = DependencyResolver.Kernel.Get <IIndividualService>(); // Draw all components InitializeComponent(); this.DataContext = this; // Initialize notifications notifier = new Notifier(cfg => { cfg.PositionProvider = new WindowPositionProvider( parentWindow: System.Windows.Application.Current.Windows.OfType <MainWindow>().FirstOrDefault(), corner: Corner.TopRight, offsetX: 10, offsetY: 10); cfg.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor( notificationLifetime: TimeSpan.FromSeconds(3), maximumNotificationCount: MaximumNotificationCount.FromCount(3)); cfg.Dispatcher = Application.Current.Dispatcher; }); CurrentIndividual = IndividualViewModel; if (CurrentIndividual.Code <= 0) { CurrentIndividual.Code = individualService.GetNewCodeValue().Code; } // Add handler for keyboard shortcuts AddHandler(Keyboard.KeyDownEvent, (KeyEventHandler)HandleKeyDownEvent); txtName.Focus(); }
public IndividualController(IServiceProvider provider) { individualService = provider.GetRequiredService <IIndividualService>(); }
public IndividualController(IIndividualService individualService) { _individualService = individualService; }
public IndividualController(IAccountService AccountService, IIndividualService IndividualService) { _AccountService = AccountService; _IndividualService = IndividualService; }
public IndividualsController(IIndividualService individualService, ICityService cityService, ILogger <HomeController> logger) { _individualService = individualService ?? throw new ArgumentNullException(nameof(individualService)); _cityService = cityService ?? throw new ArgumentNullException(nameof(cityService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public CreateIndividualOnNormalDb(IIndividualService individualService) { _individualService = individualService; }
public AddressController(IAddressService addressService, IIndividualService individualService) { _addressService = addressService; _individualService = individualService; }