File tree Expand file tree Collapse file tree
test/Libraries/RevitIntegrationTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using System . IO ;
2+ using NUnit . Framework ;
3+ using RevitTestServices ;
4+ using RTF . Framework ;
5+
6+ namespace RevitSystemTests
7+ {
8+ [ TestFixture ]
9+ class SubelementTests : RevitSystemTestBase
10+ {
11+ [ Test ]
12+ [ TestModel ( @".\SubelementTests.rvt" ) ]
13+ public void GetParameterValueOfSubelement ( )
14+ {
15+ string samplePath = Path . Combine ( workingDirectory , @".\Script\GetParameterValueOfSubelement.dyn" ) ;
16+ string testPath = Path . GetFullPath ( samplePath ) ;
17+
18+ ViewModel . OpenCommand . Execute ( testPath ) ;
19+
20+ RunCurrentModel ( ) ;
21+
22+ var subelemCat = GetFlattenedPreviewValues ( "062360f4d4514b70b3da0b0b73c1ee01" ) ;
23+ Assert . AreEqual ( "Analytical Duct Segments" , subelemCat [ 0 ] . ToString ( ) ) ;
24+
25+ var subelemElement = GetFlattenedPreviewValues ( "8e50e4cab1bd4517abc6d3ca81d11110" ) ;
26+ Assert . AreEqual ( "Duct" , subelemElement [ 0 ] . ToString ( ) ) ;
27+
28+ var getAllParams = GetFlattenedPreviewValues ( "01312066e09b4b1e86b76bad85944e9f" ) ;
29+ Assert . AreEqual ( 20 , getAllParams . Count ) ;
30+
31+ var getParamValue = GetFlattenedPreviewValues ( "c0448b187dc74bce8e0ecbfba591d0fc" ) ;
32+ Assert . AreEqual ( 20 , getAllParams . Count ) ;
33+ Assert . AreEqual ( "Supply Air" , getParamValue [ 3 ] . ToString ( ) ) ;
34+ }
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments