Exemplo n.º 1
0
        public void Setup()
        {
            settingService = new UserSettingServiceStub();
            appSettings    = (AppSettingsStub)settingService.AppSettings;
            fileService    = new ConfigJsonFileServiceStub();
            target         = new ConfigJsonService(settingService, fileService);
            target.ConfigJson.IsChanged = true;
            var obj = new PrivateObject(target);

            obj.SetProperty(nameof(ConfigJsonService.CurrentPreset), new PresetInfo()
            {
                Id = "300"
            });
            notifiedProperies       = new List <string>();
            target.PropertyChanged += (_, e) => notifiedProperies.Add(e.PropertyName);
            errorEvent              = null;
            target.ErrorOccurred   += (_, e) => errorEvent = e;
        }
Exemplo n.º 2
0
 public void Setup()
 {
     userSetting = new UserSettingServiceStub();
     target      = new UriConversionService(userSetting);
 }