2626import java .util .Map ;
2727import java .util .UUID ;
2828import java .util .concurrent .CompletableFuture ;
29+
2930import static org .junit .jupiter .api .Assertions .assertDoesNotThrow ;
3031import static org .junit .jupiter .api .Assertions .assertFalse ;
3132import static org .junit .jupiter .api .Assertions .assertNotNull ;
3435@ TestMethodOrder (MethodOrderer .OrderAnnotation .class )
3536public class SitewiseTests {
3637
37- private static final String assetModelName = "MyAssetModel" + UUID .randomUUID ();
38+ private static final String assetModelName = "MyAssetModel" + UUID .randomUUID ();
3839 private static final String assetName = "MyAsset" ;
3940
4041 private static String assetId = "" ;
4142 private static final String portalName = "MyPortal" ;
4243 private static String contactEmail = "" ;
43- private static final String gatewayName = "myGateway" + UUID .randomUUID ();
44- private static final String myThing = "myThing" + UUID .randomUUID ();
44+ private static final String gatewayName = "myGateway" + UUID .randomUUID ();
45+ private static final String myThing = "myThing" + UUID .randomUUID ();
4546
4647 private static String assetModelId = "" ;
4748
@@ -80,7 +81,6 @@ public static void setUp() {
8081 @ Order (1 )
8182 public void testHelloService () {
8283 assertDoesNotThrow (HelloSitewise ::fetchAssetModels );
83- System .out .println (" Test 1 passed" );
8484 }
8585
8686 @ Test
@@ -97,8 +97,6 @@ public void testCreateAssetModel() {
9797 assetModelId = response .assetModelId ();
9898 assertNotNull (assetModelId );
9999 });
100-
101- System .out .println ("Test 2 passed" );
102100 }
103101
104102 @ Test
@@ -112,7 +110,6 @@ public void testCreateAsset() throws InterruptedException {
112110 assetId = response .assetId ();
113111 assertNotNull (assetId );
114112 });
115- System .out .println ("Test 3 passed" );
116113 }
117114
118115 @ Test
@@ -121,12 +118,11 @@ public void testCreateAsset() throws InterruptedException {
121118 public void testGetPropIds () {
122119 assertDoesNotThrow (() -> {
123120 propertyIds = sitewiseActions .getPropertyIds (assetModelId ).join ();
124- humPropId = propertyIds .get ("Humidity" );
125- System .out .println ("The Humidity property Id is " + humPropId );
121+ humPropId = propertyIds .get ("Humidity" );
122+ System .out .println ("The Humidity property Id is " + humPropId );
126123 tempPropId = propertyIds .get ("Temperature" );
127124 System .out .println ("The Temperature property Id is " + tempPropId );
128125 });
129- System .out .println ("Test 4 passed" );
130126 }
131127
132128 @ Test
@@ -136,7 +132,6 @@ public void testSendProps() {
136132 assertDoesNotThrow (() -> {
137133 sitewiseActions .sendDataToSiteWiseAsync (assetId , tempPropId , humPropId ).join ();
138134 });
139- System .out .println ("Test 5 passed" );
140135 }
141136
142137 @ Test
@@ -146,7 +141,6 @@ public void testGETHumValue() {
146141 assertDoesNotThrow (() -> {
147142 sitewiseActions .getAssetPropValueAsync (humPropId , assetId );
148143 });
149- System .out .println ("Test 6 passed" );
150144 }
151145
152146 @ Test
@@ -157,7 +151,6 @@ public void testCreatePortal() {
157151 portalId = sitewiseActions .createPortalAsync (portalName , iamRole , contactEmail ).join ();
158152 assertNotNull (portalId );
159153 });
160- System .out .println ("Test 7 passed" );
161154 }
162155
163156 @ Test
@@ -168,7 +161,6 @@ public void testDescribePortal() {
168161 String portalUrl = sitewiseActions .describePortalAsync (portalId ).join ();
169162 assertNotNull (portalUrl );
170163 });
171- System .out .println ("Test 8 passed" );
172164 }
173165
174166 @ Test
@@ -179,7 +171,6 @@ public void testCreateGateway() {
179171 gatewayId = sitewiseActions .createGatewayAsync (gatewayName , myThing ).join ();
180172 assertNotNull (gatewayId );
181173 });
182- System .out .println ("Test 9 passed" );
183174 }
184175
185176 @ Test
@@ -189,7 +180,6 @@ public void testDescribeGateway() {
189180 assertDoesNotThrow (() -> {
190181 sitewiseActions .describeGatewayAsync (gatewayId ).join ();
191182 });
192- System .out .println ("Test 10 passed" );
193183 }
194184
195185 @ Test
@@ -199,8 +189,7 @@ public void testDeletePortal() throws InterruptedException {
199189 Thread .sleep (30000 );
200190 assertDoesNotThrow (() -> {
201191 sitewiseActions .deletePortalAsync (portalId ).join ();
202- });
203- System .out .println ("Test 11 passed" );
192+ });
204193 }
205194
206195 @ Test
@@ -211,7 +200,6 @@ public void testDeleteAsset() throws InterruptedException {
211200 assertDoesNotThrow (() -> {
212201 sitewiseActions .deleteAssetAsync (assetId ).join ();
213202 });
214- System .out .println ("Test 11 passed" );
215203 }
216204
217205 @ Test
@@ -223,7 +211,6 @@ public void testDeleteAssetModel() throws InterruptedException {
223211 sitewiseActions .deleteAssetModelAsync (assetModelId ).join ();
224212 });
225213 CloudFormationHelper .destroyCloudFormationStack (ROLES_STACK );
226- System .out .println ("Test 11 passed" );
227214 }
228215
229216
0 commit comments