private AssociationService CreateProductAssociationServiceMock(IEnumerable <dataModel.AssociationEntity> entities)
        {
            var catalogRepositoryFactory   = CreateRepositoryMock(entities);
            var productAssociationsService = new AssociationService(catalogRepositoryFactory);

            return(productAssociationsService);
        }
 public override void OnActionExecuting()
 {
     _locationService    = CreateService <LocationService>();
     _associationService = CreateService <AssociationService>();
     _communityService   = CreateService <BL.CommunityService>();
     _sectionService     = CreateService <SectionService>();
     _contactService     = CreateService <ContactService>();
     _attachmentService  = CreateService <AttachmentService>();
     _communityMapper    = new CommunityMapper(this._mapper);
 }
Пример #3
0
        private AssociationService CreateDynamicAssociationService()
        {
            var memoryCache         = new MemoryCache(Options.Create(new MemoryCacheOptions()));
            var platformMemoryCache = new PlatformMemoryCache(memoryCache, Options.Create(new CachingOptions()), new Mock <ILogger <PlatformMemoryCache> >().Object);

            _dynamicAssociationsRepository.Setup(x => x.UnitOfWork).Returns(_unityOfWorkMock.Object);

            var result = new AssociationService(() => _dynamicAssociationsRepository.Object, platformMemoryCache, _eventPublisherMock.Object);

            return(result);
        }
Пример #4
0
        private AssociationSearchService CreateDynamicAssociationSearchServiceMock(IEnumerable <AssociationEntity> entities)
        {
            var dynamicAssociationsRepositoryFactory = CreateRepositoryMock(entities);
            var platformMemoryCache = GetPlatformMemoryCache();
            var eventPublisherMock  = new Mock <IEventPublisher>();

            var dynamicAssociationsService = new AssociationService(dynamicAssociationsRepositoryFactory, platformMemoryCache, eventPublisherMock.Object);
            var result = new AssociationSearchService(dynamicAssociationsRepositoryFactory, platformMemoryCache, dynamicAssociationsService);

            return(result);
        }
Пример #5
0
 public DICOMServiceClass(Entity ae)
 {
     ApplicationEntity         = ae;
     SupportedTransferSyntaxes = new List <string>
     {
         TransferSyntaxHelper.IMPLICIT_VR_LITTLE_ENDIAN,
         TransferSyntaxHelper.EXPLICIT_VR_LITTLE_ENDIAN
     };
     SupportedAbstractSyntaxes = new List <string>();
     DIMSEService       = new DIMSEService();
     AssociationService = new AssociationService();
     Logger             = new EventLogger();
 }
Пример #6
0
        public MainWindow()
        {
            InitializeComponent();

            var viewModelLogic = new MainViewModel();

            DataContext = viewModelLogic;

            // Open with program handling
            var args = Environment.GetCommandLineArgs();

            if (args.Length >= 2)
            {
                var path = args[1];
                if (path.EndsWith("SAVEDAT.SAV"))
                {
                    viewModelLogic.LoadSaveGame(path);
                }
            }

            AssociationService.EnsureAssociationsSet();
        }
Пример #7
0
        public static Association CreateAssociation(
            string mainUid                         = "X12345",
            string associatedUid                   = "A98765",
            StpIndicator indicator                 = StpIndicator.Permanent,
            ICalendar calendar                     = null,
            Location location                      = null,
            AssociationCategory category           = AssociationCategory.Join,
            AssociationDateIndicator dateIndicator = AssociationDateIndicator.Standard)
        {
            location = location ?? TestLocations.CLPHMJN;
            var main = new AssociationService()
            {
                TimetableUid = mainUid,
                AtLocation   = location,
                Sequence     = 1,
            };
            var associated = new AssociationService()
            {
                TimetableUid = associatedUid,
                AtLocation   = location,
                Sequence     = 1,
            };

            var association = new Association(Substitute.For <ILogger>())
            {
                Main          = main,
                Associated    = associated,
                AtLocation    = location,
                StpIndicator  = indicator,
                Category      = category,
                DateIndicator = dateIndicator,
                Calendar      = calendar ?? TestSchedules.EverydayAugust2019
            };

            return(association);
        }
 public AssociationController(AssociationService assoService)
 {
     _assoService = assoService;
 }
Пример #9
0
 public AssociationController(FaciTechDbContext faciTechDbContext, IMapper mapper) : base(faciTechDbContext, mapper)
 {
     _associationService = CreateService <AssociationService>();
 }
Пример #10
0
 public AssociationsController(AssociationDbContext context, AssociationService associationService)
 {
     _context            = context;
     _associationService = associationService;
 }