Drive Detection Indexer warning refinement (#5221)

* show results always and conditionally show warning

* changed test logic to show warning when expected

* renamed unit test
This commit is contained in:
Alekhya
2020-07-24 17:45:07 -07:00
committed by GitHub
parent 563fb3ff5c
commit 025f2507f4
3 changed files with 83 additions and 85 deletions

View File

@@ -299,11 +299,11 @@ namespace Wox.Test.Plugins
mockapi.Verify(m => m.GetTranslation("Microsoft_plugin_indexer_open_in_console"), Times.Once());
}
[TestCase(0, false, ExpectedResult = false)]
[TestCase(0, true, ExpectedResult = true)]
[TestCase(1, false, ExpectedResult = true)]
[TestCase(1, true, ExpectedResult = true)]
public bool DriveDetection_MustDisplayResults_WhenEnhancedModeIsOnOrWhenWarningIsDisabled(int enhancedModeStatus, bool disableWarningCheckBoxStatus)
[TestCase(0, false, ExpectedResult = true)]
[TestCase(0, true, ExpectedResult = false)]
[TestCase(1, false, ExpectedResult = false)]
[TestCase(1, true, ExpectedResult = false)]
public bool DriveDetection_MustDisplayWarning_WhenEnhancedModeIsOffAndWhenWarningIsNotDisabled(int enhancedModeStatus, bool disableWarningCheckBoxStatus)
{
// Arrange
var mockRegistry = new Mock<IRegistryWrapper>();
@@ -313,7 +313,7 @@ namespace Wox.Test.Plugins
_driveDetection.IsDriveDetectionWarningCheckBoxSelected = disableWarningCheckBoxStatus;
// Act & Assert
return _driveDetection.DisplayResults();
return _driveDetection.DisplayWarning();
}
}