Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
Fixed code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-dev004 committed Oct 5, 2022
1 parent 35bc2e2 commit b4c4d1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,11 @@ public override void Initialize(INavigationParameters parameters)
try
{
// Submit survey content if needed
if (_surveyContent != null)
if (_surveyContent != null && !await _surveyService.SubmitSurvey(_surveyContent))
{
if (!await _surveyService.SubmitSurvey(_surveyContent))
{
await _dialogService.ShowNetworkConnectionErrorAsync();
_loggerService.Error("Failed submit survey");
return;
}
await _dialogService.ShowNetworkConnectionErrorAsync();
_loggerService.Error("Failed submit survey");
return;
}
// Stop exposure notifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public async Task BuildSurveyContentTests_HasExposureDataProvision()
Assert.Equal(2, result.Q2);
Assert.Equal(1640962800, result.Q3);
Assert.Equal("1234", result.ExposureData.EnVersion);
Assert.Equal(1, result.ExposureData.DailySummaryList.Count);
Assert.Equal(1, result.ExposureData.ExposureWindowList.Count);
Assert.Single(result.ExposureData.DailySummaryList);
Assert.Single(result.ExposureData.ExposureWindowList);

_mockExposureNotificationApiService.Verify(x => x.GetVersionAsync(), Times.Once());
_mockExposureDataRepository.Verify(x => x.GetDailySummariesAsync(), Times.Once());
Expand Down

0 comments on commit b4c4d1f

Please sign in to comment.