Skip to content

Commit

Permalink
fix failing test due to the wrong new project overload being called
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Oct 25, 2024
1 parent bd66260 commit 8eacf43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
namespace FwDataMiniLcmBridge.Tests.Fixtures;

public class MockFwProjectLoader(IOptions<FwDataBridgeConfig> config)
: ProjectLoader(config), IDisposable, IProjectLoader
: ProjectLoader(config), IDisposable
{
public Dictionary<string, LcmCache> Projects { get; } = new();

LcmCache IProjectLoader.LoadCache(string fileName, string? overridePath)
public override LcmCache LoadCache(string fileName, string? projectFolder)
{
if (!Projects.TryGetValue(Path.GetFileNameWithoutExtension(fileName), out var cache))
{
Expand All @@ -19,7 +19,7 @@ LcmCache IProjectLoader.LoadCache(string fileName, string? overridePath)
return cache;
}

LcmCache IProjectLoader.NewProject(string fileName, string analysisWs, string vernacularWs)
public override LcmCache NewProject(string fileName, string analysisWs, string vernacularWs)
{
Init();
var lcmDirectories = new LcmDirectories(ProjectFolder, TemplatesFolder);
Expand Down
4 changes: 2 additions & 2 deletions backend/FwLite/FwDataMiniLcmBridge/LcmUtils/ProjectLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void Init()
/// </summary>
/// <param name="fileName">could be the full path or just the file name, the path will be ignored, must include the extension</param>
/// <returns></returns>
public LcmCache LoadCache(string fileName, string? overridePath = null)
public virtual LcmCache LoadCache(string fileName, string? overridePath = null)
{
Init();
fileName = Path.GetFileName(fileName);
Expand All @@ -70,7 +70,7 @@ public LcmCache LoadCache(string fileName, string? overridePath = null)
return cache;
}

public LcmCache NewProject(string fileName, string analysisWs, string vernacularWs)
public virtual LcmCache NewProject(string fileName, string analysisWs, string vernacularWs)
{
Init();
var lcmDirectories = new LcmDirectories(ProjectFolder, TemplatesFolder);
Expand Down

0 comments on commit 8eacf43

Please sign in to comment.