Skip to content

Commit

Permalink
Add ricaun.RevitAPIUI.Fake.Reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Sep 27, 2024
1 parent 0dce1b8 commit 42c5261
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
dotnet-version: |
7.0.x
8.0.x
- name: "NuGet Add Source Organization"
run: if ("${{ secrets.ORGANIZATION_SOURCE_PACKAGE_PASSWORD }}" -ne "") { dotnet nuget add source --username ${{ secrets.ORGANIZATION_SOURCE_PACKAGE_USERNAME }} --password ${{ secrets.ORGANIZATION_SOURCE_PACKAGE_PASSWORD }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{github.repository_owner}}/index.json" }
# - name: "NuGet Add Source Organization"
# run: if ("${{ secrets.ORGANIZATION_SOURCE_PACKAGE_PASSWORD }}" -ne "") { dotnet nuget add source --username ${{ secrets.ORGANIZATION_SOURCE_PACKAGE_USERNAME }} --password ${{ secrets.ORGANIZATION_SOURCE_PACKAGE_PASSWORD }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{github.repository_owner}}/index.json" }

- name: Run './build/build.cmd'
run: ./build/build.cmd --root ./build
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Support environment variables to overwrite settings in the `TestAdapter`. (Fix: #57)
### Command
- Update to use `JsonService` implementation to use `Newtonsoft.Json` in the domain.
### Console
- Add `RevitTestUtils.Exceptions` to show exceptions in the console.
- Add `ricaun.RevitAPIUI.Fake.Reference` to fix `RevitAPIUI` reference exception in the discovery test.
- Disable discovery test to use `RevitAPIUI` version `2021` to `2023`.
### Shared
- Update to use `ricaun.NamedPipeWrapper.Json` version `1.8.0`.
### TestAdapter
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>1.5.1-beta.2</Version>
<Version>1.5.1-beta.3</Version>
</PropertyGroup>
</Project>
Binary file not shown.
9 changes: 7 additions & 2 deletions ricaun.RevitTest.Console/Revit/Utils/RevitTestUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace ricaun.RevitTest.Console.Revit.Utils
/// </summary>
public static class RevitTestUtils
{
private const bool EnableSelectMinMaxVersionReference = false;
private const int RevitMinVersionReference = 2021;
private const int RevitMaxVersionReference = 2023;

Expand All @@ -43,7 +44,7 @@ public static string[] GetTestFullNames(string filePath)
// Problem with AnavRes.dll / adui22res.dll (version -2020)
// Problem with UI (version 2024)
var revitVersionMinMax = Math.Min(Math.Max(revitVersion, RevitMinVersionReference), RevitMaxVersionReference);
if (RevitInstallationUtils.InstalledRevit.TryGetRevitInstallationGreater(revitVersionMinMax, out RevitInstallation revitInstallationMinMax))
if (EnableSelectMinMaxVersionReference && RevitInstallationUtils.InstalledRevit.TryGetRevitInstallationGreater(revitVersionMinMax, out RevitInstallation revitInstallationMinMax))
{
LoggerTest($"GetTest Version {revitVersionMinMax}");
Log.WriteLine($"RevitTestUtils: {revitInstallationMinMax.InstallLocation}");
Expand All @@ -56,6 +57,10 @@ public static string[] GetTestFullNames(string filePath)
tests = TestEngine.GetTestFullNames(filePath, revitInstallation.InstallLocation);
}

foreach (var exception in TestEngine.Exceptions)
{
Log.WriteLine($"RevitTestUtils.Exceptions: {exception}");
}
if (tests.Length == 0)
{
throw new Exception($"Unable to read tests class using the Revit version {revitVersion}.");
Expand Down Expand Up @@ -111,7 +116,7 @@ public static void CreateRevitServer(
{
int timeoutNotBusyCountMax = 10;

if (timeoutMinutes <= 0)
if (timeoutMinutes <= 0)
timeoutMinutes = TimeoutMinutesDefault;

if (revitVersionNumber == 0)
Expand Down
1 change: 1 addition & 0 deletions ricaun.RevitTest.Console/ricaun.RevitTest.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

<ItemGroup>
<PackageReference Include="ricaun.Revit.Installation" Version="*" />
<PackageReference Include="ricaun.RevitAPIUI.Fake.Reference" Version="*-*" />
<PackageReference Include="Microsoft.VisualStudio.Interop" Version="*" />
</ItemGroup>

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 42c5261

Please sign in to comment.