File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
.ci/unit-tests/Robot_Adapter_Tests Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 35
35
using BH . oM . Analytical . Results ;
36
36
using System ;
37
37
using Shouldly ;
38
+ using BH . oM . Adapter . Commands ;
38
39
39
40
namespace BH . Tests . Adapter . Robot
40
41
{
@@ -52,6 +53,26 @@ public void OneTimeSetup()
52
53
m_Adapter = new RobotAdapter ( modelPath , null , true ) ;
53
54
}
54
55
56
+ [ SetUp ]
57
+ public void Setup ( )
58
+ {
59
+ BH . Engine . Base . Compute . ClearCurrentEvents ( ) ;
60
+ }
61
+
62
+ [ TearDown ]
63
+ public void TearDown ( )
64
+ {
65
+ var events = BH . Engine . Base . Query . CurrentEvents ( ) ;
66
+ if ( events . Any ( ) )
67
+ {
68
+ Console . WriteLine ( "BHoM events raised during execution:" ) ;
69
+ foreach ( var ev in events )
70
+ {
71
+ Console . WriteLine ( $ "{ ev . Type } : { ev . Message } ") ;
72
+ }
73
+ }
74
+ }
75
+
55
76
[ Test ]
56
77
public void PullBarsWithTag ( )
57
78
{
Original file line number Diff line number Diff line change @@ -55,12 +55,22 @@ public void OntimeSetup()
55
55
public void Setup ( )
56
56
{
57
57
m_Adapter . Execute ( new NewModel ( ) ) ;
58
+ BH . Engine . Base . Compute . ClearCurrentEvents ( ) ;
58
59
}
59
60
60
61
[ TearDown ]
61
62
public void TearDown ( )
62
63
{
63
64
m_Adapter . Execute ( new Close { SaveBeforeClose = false } ) ;
65
+ var events = BH . Engine . Base . Query . CurrentEvents ( ) ;
66
+ if ( events . Any ( ) )
67
+ {
68
+ Console . WriteLine ( "BHoM events raised during execution:" ) ;
69
+ foreach ( var ev in events )
70
+ {
71
+ Console . WriteLine ( $ "{ ev . Type } : { ev . Message } ") ;
72
+ }
73
+ }
64
74
}
65
75
66
76
[ Test ]
@@ -110,7 +120,6 @@ public void PushBarsWithTag()
110
120
bar . Tags . ShouldContain ( tag ) ;
111
121
}
112
122
}
113
-
114
123
}
115
124
116
125
[ Test ]
You can’t perform that action at this time.
0 commit comments