Skip to content

Commit

Permalink
Adjust Unit test code for other uses of CommonAppDataFolder
Browse files Browse the repository at this point in the history
  • Loading branch information
gtryus committed Feb 15, 2018
1 parent 0bf13bd commit 931e415
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
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

0 comments on commit 931e415

Please sign in to comment.