Add tests for GetPreviousDirectory method

This commit is contained in:
Jeremy Wu 2020-05-26 19:49:18 +10:00
parent 2feba97f56
commit 436cfe2e2b

View file

@ -37,6 +37,10 @@ namespace Flow.Launcher.Test.Plugins
private bool MethodIndexExistsReturnsFalse(string dummyString) => false;
private bool LocationExistsReturnsTrue(string dummyString) => true;
private bool LocationNotExistReturnsFalse(string dummyString) => false;
[TestCase("C:\\Dropbox", "directory='file:C:\\Dropbox'")]
public void GivenWindowsIndexSearch_WhenProvidedFolderPath_ThenQueryWhereRestrictionsShouldUseDirectoryString(string path, string expectedString)
{
@ -195,6 +199,19 @@ namespace Flow.Launcher.Test.Plugins
$"Actual check result is {result} {Environment.NewLine}");
}
[TestCase(@"C:\Dropbox\Drop", @"C:\Dropbox")]
[TestCase(@"C:\Dropbox\Drop\App", @"C:\Dropbox\Drop")]
public void GivenAPartialPath_WhenPreviousLevelDirectoryExists_ThenShouldReturnThePreviousDirectoryPathString()
{
}
[TestCase(@"C:\Dropbox\Drop", "")]
public void GivenAPartialPath_WhenPreviousLevelDirectoryNotExists_ThenShouldReturnEmptyString()
{
}
public void GivenWindowsIndexSearch_WhenSearchPatternHotKeyIsSearchAll_ThenQueryWhereRestrictionsShouldUseScopeString() { }
}