Ejemplo n.º 1
0
 public UsageStatisticsManager(IUsageStatisticsSender sender, IOsHelper osHelper, IMachineIdGenerator machineIdGenerator,
                               ApplicationNameProvider applicationNameProvider, IVersionHelper versionHelper)
 {
     _sender                  = sender;
     _osHelper                = osHelper;
     _machineIdGenerator      = machineIdGenerator;
     _applicationNameProvider = applicationNameProvider;
     _versionHelper           = versionHelper;
     _processedJobCounter     = 0;
 }
        public void SetUp()
        {
            _osHelper                = Substitute.For <IOsHelper>();
            _versionHelper           = Substitute.For <IVersionHelper>();
            _usageStatisticsSender   = Substitute.For <IUsageStatisticsSender>();
            _machineIdGenerator      = Substitute.For <IMachineIdGenerator>();
            _applicationNameProvider = new ApplicationNameProvider("testedition");

            _usageStatisticsManager = new UsageStatisticsManager(_usageStatisticsSender, _osHelper, _machineIdGenerator, _applicationNameProvider, _versionHelper);
        }
Ejemplo n.º 3
0
 public PdfCreatorUsageStatisticsManager(IUsageStatisticsSender sender, IOsHelper osHelper, IMachineIdGenerator machineIdGenerator,
                                         ApplicationNameProvider applicationNameProvider, IVersionHelper versionHelper,
                                         ISettingsProvider settingsProvider, IGpoSettings gpoSettings, IThreadManager threadManager)
 {
     _sender                  = sender;
     _osHelper                = osHelper;
     _machineIdGenerator      = machineIdGenerator;
     _applicationNameProvider = applicationNameProvider;
     _versionHelper           = versionHelper;
     _settingsProvider        = settingsProvider;
     _gpoSettings             = gpoSettings;
     _threadManager           = threadManager;
 }
        public void SetUp()
        {
            _osHelper      = Substitute.For <IOsHelper>();
            _versionHelper = Substitute.For <IVersionHelper>();
            _versionHelper.ApplicationVersion.Returns(info => new Version());
            _usageStatisticsSender = Substitute.For <IUsageStatisticsSender>();
            _machineIdGenerator    = Substitute.For <IMachineIdGenerator>();
            _machineIdGenerator.GetMachineId().Returns("testmachinid");
            _applicationNameProvider = new ApplicationNameProvider("testedition");
            _settings         = new PdfCreatorSettings();
            _settingsProvider = Substitute.For <ISettingsProvider>();
            _settingsProvider.Settings.Returns(_settings);
            _gpoSettings   = Substitute.For <IGpoSettings>();
            _threadManager = Substitute.For <IThreadManager>();

            _pdfCreatorUsageStatisticsManager = BuildPdfCreatorUsageStatisticsManager(_threadManager);
        }
Ejemplo n.º 5
0
 public BannerMetricFactory(ApplicationNameProvider applicationNameProvider, IVersionHelper versionHelper, IMachineIdGenerator machineIdGenerator)
 {
     _applicationNameProvider = applicationNameProvider;
     _versionHelper           = versionHelper;
     _machineIdGenerator      = machineIdGenerator;
 }