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; }
public void Setup() { userSetting = new UserSettingServiceStub(); target = new UriConversionService(userSetting); }