Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Unit test code for other uses of CommonAppDataFolder #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions src/SayMore/MediaUtils/FFmpeg/FFmpegDownloadHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,7 @@ public static string FFmpegForSayMoreFolder
}

/// ------------------------------------------------------------------------------------
public static string FFmpegForSayMoreParentFolder
{
get
{
#if DEBUG
//Program.CommonAppDataFolder; gives some resharper folder during tests
return Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),"SIL/SayMore");
#else
return Program.CommonAppDataFolder;
#endif
}
}
public static string FFmpegForSayMoreParentFolder => Program.CommonAppDataFolder;

/// ------------------------------------------------------------------------------------
public static string FullPathToFFmpegForSayMoreExe
Expand Down
7 changes: 6 additions & 1 deletion src/SayMore/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public static void ArchiveProjectUsingIMDI(Form parentForm)

public static List<XmlException> FileLoadErrors
{
get
get
{
if (_projectContext == null || _projectContext.Project == null) // This can happen during unit testing
return new List<XmlException>(0);
Expand Down Expand Up @@ -422,7 +422,12 @@ public static string SilCommonDataFolder
/// ------------------------------------------------------------------------------------
public static string CommonAppDataFolder
{
//Application.ProductName gives some resharper folder during tests
#if DEBUG
get { return Path.Combine(SilCommonDataFolder, "Saymore"); }
#else
get { return Path.Combine(SilCommonDataFolder, Application.ProductName); }
#endif
}

/// ------------------------------------------------------------------------------------
Expand Down