Skip to content

Commit 437e4c7

Browse files
committed
Update ApplicationUtils check local file exists.
1 parent 3fb9ec6 commit 437e4c7

File tree

7 files changed

+14
-10
lines changed

7 files changed

+14
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2323
- Fix local file copy to temporary by zip folder.
2424
- Add `TestsFilePathTooLong` to similate long path inside test.
2525
- Update to use `ricaun.Revit.UI.Tasks` library to run async tests.
26+
- Update `ApplicationUtils` check local file exists.
2627

2728
## [1.3.4] / 2024-05-27
2829
### Console

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>1.3.5-rc</Version>
3+
<Version>1.3.5-rc.1</Version>
44
</PropertyGroup>
55
</Project>
-141 Bytes
Binary file not shown.
-123 Bytes
Binary file not shown.
-126 Bytes
Binary file not shown.

ricaun.RevitTest.TestAdapter/Services/ApplicationUtils.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,12 @@ public static async Task<bool> DownloadAsync(string applicationFolder, string ad
147147
private static bool LocalFileExists(string filePath, out string localFilePath)
148148
{
149149
localFilePath = filePath;
150-
if (File.Exists(localFilePath)) return true;
151150
try
152151
{
153152
var assemblyDirectory = Path.GetDirectoryName(typeof(ApplicationUtils).Assembly.Location);
154153
localFilePath = Path.Combine(assemblyDirectory, filePath);
154+
localFilePath = new FileInfo(localFilePath).FullName;
155+
AdapterLogger.Logger.Debug($"Application LocalFileCheck: {assemblyDirectory}");
155156
if (File.Exists(localFilePath))
156157
{
157158
AdapterLogger.Logger.DebugOnlyLocal($"Download File AssemblyDirectory: {assemblyDirectory}");

ricaun.RevitTest.Tests/TestsDebugger.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@
1111

1212
//[assembly: AssemblyMetadata("NUnit.Verbosity", "3")]
1313

14-
[assembly: AssemblyMetadata("NUnit.Application", "RICAUN_REVIT_TEST_APPLICATION_DA4R_LOCAL")]
15-
[assembly: AssemblyMetadata("NUnit.Application", "NUNIT_APPLICATION_TEST")]
16-
[assembly: AssemblyMetadata("NUnit.Application", "RICAUN_REVIT_TEST_APPLICATION_DA4R_ONLINE_TEST")]
17-
#if NET
18-
[assembly: AssemblyMetadata("NUnit.Application", "..\\..\\..\\..\\ricaun.RevitTest.Console\\bin\\Debug\\net8.0-windows\\ricaun.RevitTest.Console.exe")]
19-
#else
20-
[assembly: AssemblyMetadata("NUnit.Application", "..\\..\\..\\..\\ricaun.RevitTest.Console\\bin\\Debug\\net48\\ricaun.RevitTest.Console.exe")]
21-
#endif
14+
//[assembly: AssemblyMetadata("NUnit.Application", "RICAUN_REVIT_TEST_APPLICATION_DA4R_LOCAL")]
15+
//[assembly: AssemblyMetadata("NUnit.Application", "NUNIT_APPLICATION_TEST")]
16+
//[assembly: AssemblyMetadata("NUnit.Application", "RICAUN_REVIT_TEST_APPLICATION_DA4R_ONLINE_TEST")]
17+
//#if NET
18+
//[assembly: AssemblyMetadata("NUnit.Application", "..\\..\\..\\..\\ricaun.RevitTest.Console\\bin\\Debug\\net8.0-windows\\ricaun.RevitTest.Console.exe")]
19+
//#else
20+
//[assembly: AssemblyMetadata("NUnit.Application", "..\\..\\..\\..\\ricaun.RevitTest.Console\\bin\\Debug\\net48\\ricaun.RevitTest.Console.exe")]
21+
//#endif
22+
23+
[assembly: AssemblyMetadata("NUnit.Application", "..\\..\\..\\..\\ricaun.RevitTest.Console\\bin\\Debug\\ricaun.DA4R.NUnit.Console.zip")]
2224

2325
//[assembly: AssemblyMetadata("NUnit.Language", "ENU /hosted")]
2426
#endif

0 commit comments

Comments
 (0)