Skip to content

Commit

Permalink
updated test to detect whether dev build or not on mac, and check the…
Browse files Browse the repository at this point in the history
… relevant file extension
  • Loading branch information
peichins committed May 27, 2020
1 parent 796057e commit 0bd49d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Acoustics.Shared/Meta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public static class Meta

private static Assembly[] ourAssemblies;

public static string BinaryName => AppConfigHelper.IsWindows ? Name : "AnalysisPrograms";
public static string BinaryName(bool isSelfContained)
{
var extension = isSelfContained ? string.Empty : ".dll";
return AppConfigHelper.IsWindows ? Name : "AnalysisPrograms" + extension;
}

public static string Organization { get; } = "QUT";

Expand Down
3 changes: 2 additions & 1 deletion tests/Acoustics.Test/Shared/AppConfigHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace Acoustics.Test.Shared
using System.IO;
using Acoustics.Shared;
using Acoustics.Test.TestHelpers;
using global::AnalysisPrograms;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using static Acoustics.Shared.AppConfigHelper;

Expand All @@ -28,7 +29,7 @@ public void ExecutingAssemblyDirectoryIsSet()
var actual = ExecutingAssemblyDirectory;

Assert.That.DirectoryExists(actual);
Assert.That.FileExists(Path.Join(actual, Meta.BinaryName));
Assert.That.FileExists(Path.Join(actual, Meta.BinaryName(BuildMetadata.CompiledAsSelfContained)));
}

[TestMethod]
Expand Down

0 comments on commit 0bd49d3

Please sign in to comment.