コード例 #1
0
        public async Task Remove_SettingsWasChanged_GetReturnDefaultSettings(bool vibroEnabled, bool soundsEnabled)
        {
            //arrange
            var userSettingsService = new UserSettingsService(_cache, _webService, _toastService);

            var settings = await userSettingsService.Get();

            settings.IsSoundsEnabled = soundsEnabled;
            settings.IsVibroEnabled  = vibroEnabled;

            //act
            await userSettingsService.Save(settings);

            await userSettingsService.Remove();

            //assert
            var newSettings = await userSettingsService.Get();

            Assert.True(newSettings.IsVibroEnabled);
            Assert.True(newSettings.IsSoundsEnabled);
        }