File tree Expand file tree Collapse file tree
Nice3point.TUnit.Revit.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using Autodesk . Revit . DB ;
2- using Nice3point . TUnit . Revit . Executors ;
1+ using Nice3point . TUnit . Revit . Executors ;
32using TUnit . Core . Executors ;
43
54namespace Nice3point . TUnit . Revit . Tests ;
@@ -11,7 +10,7 @@ public sealed class RevitApplicationTests : RevitApiTest
1110 public async Task Documents_Startup_IsEmpty ( )
1211 {
1312 var documents = Application . Documents . Cast < Document > ( ) ;
14-
13+
1514 await Assert . That ( documents ) . IsEmpty ( ) ;
1615 }
1716
@@ -20,7 +19,12 @@ public async Task Documents_Startup_IsEmpty()
2019 public async Task Create_XYZ_ValidDistance ( )
2120 {
2221 var point = Application . Create . NewXYZ ( 3 , 4 , 5 ) ;
23-
24- await Assert . That ( point . DistanceTo ( XYZ . Zero ) ) . IsEqualTo ( 7 ) . Within ( 0.1 ) ;
22+
23+ await Assert . That ( point . DistanceTo ( XYZ . Zero ) )
24+ #if NET
25+ . IsEqualTo ( 7 ) . Within ( 0.1 ) ;
26+ #else
27+ . IsBetween ( 7 , 7.1 ) ;
28+ #endif
2529 }
2630}
Original file line number Diff line number Diff line change 1- using Autodesk . Revit . DB ;
2- using Nice3point . TUnit . Revit . Executors ;
1+ using Nice3point . TUnit . Revit . Executors ;
32using TUnit . Core . Executors ;
43
54namespace Nice3point . TUnit . Revit . Tests ;
@@ -30,7 +29,7 @@ public async Task FilteredElementCollector_ElementTypes_ValidAssignable()
3029 var elements = new FilteredElementCollector ( _documentFile )
3130 . WhereElementIsElementType ( )
3231 . ToElements ( ) ;
33-
32+
3433 using ( Assert . Multiple ( ) )
3534 {
3635 await Assert . That ( elements ) . IsNotEmpty ( ) ;
@@ -46,8 +45,15 @@ public async Task Delete_Dimensions_ElementsWithDependenciesDeleted()
4645 var elementIds = new FilteredElementCollector ( _documentFile )
4746 . WhereElementIsNotElementType ( )
4847 . OfCategory ( BuiltInCategory . OST_Dimensions )
48+ #if REVIT2025_OR_GREATER
4949 . OfClass ( typeof ( RadialDimension ) )
5050 . ToElementIds ( ) ;
51+ #else
52+ . Cast < Dimension > ( )
53+ . Where ( dimension => dimension . DimensionShape == DimensionShape . Radial )
54+ . Select ( dimension => dimension . Id )
55+ . ToList ( ) ;
56+ #endif
5157
5258 using var transaction = new Transaction ( _documentFile ) ;
5359 transaction . Start ( "Delete dimensions" ) ;
You can’t perform that action at this time.
0 commit comments