Releases: Nice3point/RevitUnit
2027.0.1
-
Updated TUnit to 1.44
-
Reworked
RevitThreadExecutor, fixing crashes and thread-affinity issues -
TUnit 1.33 changed the order in which test classes are initialised: instance field initialisers now run before the Revit session hook.
Field initialisers that previously worked are no longer safe, because they load Revit API types before the application is injected.
Rewrite them lazily c92b6b9.Before:
private protected Dictionary<string, Document> Documents { get; } = [];
After:
private protected Dictionary<string, Document> Documents => field ??= new();
Full changelog: 2027.0.0...2027.0.1
2027.0.0
This release adds support for Revit 2027, testing for different languages and custom Revit installation path.
Localization support
TUnit initializes Revit with the English - United States language. To override these defaults:
-
Add the assembly-level attribute to any .cs file in your project (e.g., TestsConfiguration.cs):
using Nice3point.Revit.Injector.Attributes; [assembly: RevitLanguage("ENU")]
-
Or add the attributes directly to your .csproj file:
<!-- Revit Environment Configuration --> <ItemGroup> <AssemblyAttribute Include="Nice3point.Revit.Injector.Attributes.RevitLanguageAttribute"> <_Parameter1>ENU</_Parameter1> </AssemblyAttribute> </ItemGroup>
The RevitLanguage attribute accepts a language name (e.g., "English - United States"), code (e.g., "ENU")
or LanguageType enum value (e.g., "English_GB" or "15").
Custom Revit installation path
TUnit initializes Revit from C:\Program Files\Autodesk\Revit {version} installation path. To override these defaults:
-
Add the assembly-level attribute to any .cs file in your project (e.g., TestsConfiguration.cs):
using Nice3point.Revit.Injector.Attributes; [assembly: RevitInstallationPath("D:\Autodesk\Revit Preview")]
-
Or add the attributes directly to your .csproj file:
<!-- Revit Environment Configuration --> <ItemGroup> <AssemblyAttribute Include="Nice3point.Revit.Injector.Attributes.RevitInstallationPathAttribute"> <_Parameter1>D:\Autodesk\Revit $(RevitVersion)</_Parameter1> </AssemblyAttribute> </ItemGroup>
Enhancements
- Added new samples
- Fixed ExecutionContext to capture AsyncLocal values like TestContext
Full changelog: 2026.0.4...2027.0.0
2027.0.0-preview.4.20260322
This release adds support for Revit 2027, testing for different languages and custom Revit installation path.
Localization support
TUnit initializes Revit with the English - United States language. To override these defaults, use assembly-level attributes:
-
Add the attributes to any .cs file in your project (e.g., TestsConfiguration.cs):
using Nice3point.Revit.Injector.Attributes; [assembly: RevitLanguage("ENG")]
-
Add the attributes directly to your .csproj file:
<!-- Revit Environment Configuration --> <ItemGroup> <AssemblyAttribute Include="Nice3point.Revit.Injector.Attributes.RevitLanguageAttribute"> <_Parameter1>ENG</_Parameter1> </AssemblyAttribute> </ItemGroup>
The RevitLanguage attribute accepts a language name (e.g., "English - United States"), code (e.g., "ENU")
or LanguageType enum value (e.g., "English_GB" or "15").
Custom Revit installation path
TUnit initializes Revit from C:\Program Files\Autodesk\Revit {version} installation path. To override these defaults, use assembly-level attributes:
-
Add the attributes to any .cs file in your project (e.g., TestsConfiguration.cs):
using Nice3point.Revit.Injector.Attributes; [assembly: RevitInstallationPath("D:\Autodesk\Revit Preview")]
-
Add the attributes directly to your .csproj file:
<!-- Revit Environment Configuration --> <ItemGroup> <AssemblyAttribute Include="Nice3point.Revit.Injector.Attributes.RevitInstallationPathAttribute"> <_Parameter1>D:\Autodesk\Revit $(RevitVersion)</_Parameter1> </AssemblyAttribute> </ItemGroup>
Enhancements
- Fix ExecutionContext to capture AsyncLocal values like TestContext
- Add new samples
Full changelog: 2027.0.0-preview.3.20260322...2027.0.0-preview.4.20260322
2026.0.4
- Fix ExecutionContext to capture AsyncLocal values like TestContext
- Update Readme to include Global TestContext registration example
Full changelog: 2026.0.3...2026.0.4
2026.0.3
- Changed the Revit initialization lifecycle. Now Revit is initialized before TestDiscovery to support Data sources.
- Added new MethodDataSource samples based on Revit runtime values.
Full changelog: 2026.0.2...2026.0.3
2026.0.2
Initial public release. Enjoy!