public void IsVisibleTitleInContentTest_Setting()
        {
            EventLogSettingPageViewModel unitUnderTest = CreateViewModel();

            unitUnderTest.Initialize(EventLogSettingPage.BuildNavigationParams(EventLogSettingPage.TransitionReason.Setting));
            Assert.False(unitUnderTest.IsVisibleTitleInContent);
        }
        public void BackButtonEnabledTest_Setting()
        {
            EventLogSettingPageViewModel unitUnderTest = CreateViewModel();

            unitUnderTest.Initialize(EventLogSettingPage.BuildNavigationParams(EventLogSettingPage.TransitionReason.Setting));
            Assert.True(unitUnderTest.BackButtonEnabled);
        }
        public void InitializeTest_ExposureNotified_Enable()
        {
            _mockSendEventLogStateRepository.Setup(x => x.GetSendEventLogState(EventType.ExposureNotified)).Returns(SendEventLogState.Enable);

            EventLogSettingPageViewModel unitUnderTest = CreateViewModel();

            unitUnderTest.Initialize(EventLogSettingPage.BuildNavigationParams(EventLogSettingPage.TransitionReason.Tutorial));

            Assert.True(unitUnderTest.ExposureNotifyIsChecked);
        }
        public async Task OnClickSaveTest_Setting()
        {
            _mockSendEventLogStateRepository.Setup(x => x.GetSendEventLogState(EventType.ExposureNotified)).Returns(SendEventLogState.NotSet);

            EventLogSettingPageViewModel unitUnderTest = CreateViewModel();

            unitUnderTest.Initialize(EventLogSettingPage.BuildNavigationParams(EventLogSettingPage.TransitionReason.Setting));

            unitUnderTest.OnExposureNotifyTapped.Execute(null);
            await unitUnderTest.OnClickSave.ExecuteAsync();

            _mockNavigationService.Verify(x => x.NavigateAsync(nameof(TutorialPage6)), Times.Never());
            _mockSplashNavigationService.Verify(x => x.NavigateNextAsync(false), Times.Never());
            _mockNavigationService.Verify(x => x.GoBackAsync(), Times.Once());
        }
        public void OnExposureNotifyTappedTest()
        {
            _mockSendEventLogStateRepository.Setup(x => x.GetSendEventLogState(EventType.ExposureNotified)).Returns(SendEventLogState.NotSet);

            EventLogSettingPageViewModel unitUnderTest = CreateViewModel();

            unitUnderTest.Initialize(EventLogSettingPage.BuildNavigationParams(EventLogSettingPage.TransitionReason.Tutorial));

            Assert.False(unitUnderTest.ExposureNotifyIsChecked);

            unitUnderTest.OnExposureNotifyTapped.Execute(null);
            Assert.True(unitUnderTest.ExposureNotifyIsChecked);

            unitUnderTest.OnExposureNotifyTapped.Execute(null);
            Assert.False(unitUnderTest.ExposureNotifyIsChecked);
        }
        public async Task OnClickSaveTest_ExposureNotified_Enable()
        {
            _mockSendEventLogStateRepository.Setup(x => x.GetSendEventLogState(EventType.ExposureNotified)).Returns(SendEventLogState.Disable);

            EventLogSettingPageViewModel unitUnderTest = CreateViewModel();

            unitUnderTest.Initialize(EventLogSettingPage.BuildNavigationParams(EventLogSettingPage.TransitionReason.Tutorial));

            unitUnderTest.OnExposureNotifyTapped.Execute(null);
            await unitUnderTest.OnClickSave.ExecuteAsync();

            Assert.True(unitUnderTest.ExposureNotifyIsChecked);

            _mockSendEventLogStateRepository.Verify(x => x.SetSendEventLogState(EventType.ExposureNotified, SendEventLogState.Enable), Times.Once());

            foreach (var eventType in EventType.All.Where(x => x != EventType.ExposureNotified))
            {
                _mockSendEventLogStateRepository.Verify(x => x.SetSendEventLogState(eventType, SendEventLogState.Disable), Times.Once());
            }
        }