예제 #1
0
        public DynamicsTests(ITestOutputHelper output)
        {
            var services = TestHelper.CreateDIContainer(output).AddTestCache();

            options = new DynamicsOptions
            {
                DynamicsApiBaseUri           = new Uri("https://no.where"),
                DynamicsApiEndpoint          = new Uri("https://no.where"),
                CircuitBreakerNumberOfErrors = 5,
                CircuitBreakerResetInSeconds = 1
            };

            var config = new ConfigurationBuilder().AddConfigurationOptions("dynamics", options).Build();

            new Configuration().ConfigureServices(new EMBC.Utilities.Configuration.ConfigurationServices
            {
                Services    = services,
                Environment = new HostingEnvironment {
                    EnvironmentName = Environments.Development
                },
                Logger        = output.BuildLogger(),
                Configuration = config
            });

            services.AddTransient(sp => A.Fake <ISecurityTokenProvider>());
            services.AddTransient <IEssContextStateReporter, EssContextStateReporter>();

            this.services = services.BuildServiceProvider(validateScopes: true);
        }
예제 #2
0
 public RemovePupilAmendmentBuilder(
     IOrganizationService organizationService,
     IOutcomeService outcomeService,
     IPupilService pupilService,
     DynamicsOptions dynamicsOptions,
     IAllocationYearConfig year,
     ILogger <RemovePupilAmendmentBuilder> logger)
     : base(
         organizationService, outcomeService, pupilService, dynamicsOptions, year, logger)
 {
 }
 public CrmAmendmentService(
     IOrganizationService organizationService,
     IEstablishmentService establishmentService,
     DynamicsOptions dynamicsOptions,
     IEnumerable <IAmendmentBuilder> amendmentBuilders)
 {
     _establishmentService = establishmentService;
     _amendmentBuilders    = amendmentBuilders;
     _organizationService  = organizationService;
     _sharePointDocumentLocationRecordId = dynamicsOptions.SharePointDocumentLocationRecordId;
 }
 protected AmendmentBuilder(
     IOrganizationService organizationService,
     IOutcomeService outcomeService,
     IPupilService pupilService,
     DynamicsOptions dynamicsOptions,
     IAllocationYearConfig year,
     ILogger <AmendmentBuilder> logger)
 {
     PupilService         = pupilService;
     _outcomeService      = outcomeService;
     _organizationService = organizationService;
     _firstLineTeam       = new EntityReference("team", dynamicsOptions.Helpdesk1stLineTeamId);
     _autoRecordedUser    = new EntityReference("systemuser", dynamicsOptions.AutoRecordedUser);
     _allocationYear      = year.Value;
     _logger = logger;
 }