From 436cfe2e2bf9640417ba2d8e732a0686abea5709 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 26 May 2020 19:49:18 +1000 Subject: [PATCH] Add tests for GetPreviousDirectory method --- Flow.Launcher.Test/Plugins/ExplorerTest.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Flow.Launcher.Test/Plugins/ExplorerTest.cs b/Flow.Launcher.Test/Plugins/ExplorerTest.cs index 8c2612477..12121ec85 100644 --- a/Flow.Launcher.Test/Plugins/ExplorerTest.cs +++ b/Flow.Launcher.Test/Plugins/ExplorerTest.cs @@ -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() { } }