summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2019-02-14 15:17:35 +0530
committerTakamune Cho <takamune.cho@att.com>2019-02-14 14:18:29 +0000
commit80eb0a82d39ff0c462118eca26853fe81f99fdac (patch)
treea33c4fc5c89938aabb011a2e3c6188ca5e9b8ec7 /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle
parentdca70fbe80f15a0c259916c40a073c6b7edf11c8 (diff)
added test cases to TestTenantCache.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: Ic7c8456b375426e831b3ba2f8e6148db9ba59d5f Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle')
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestTenantCache.java24
1 files changed, 19 insertions, 5 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestTenantCache.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestTenantCache.java
index 449db89c0..4e9aefb97 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestTenantCache.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestTenantCache.java
@@ -1,9 +1,11 @@
/*
- * ============LICENSE_START======================================================= Copyright (C)
- * 2016-2018 Ericsson. All rights reserved.
- * ================================================================================ Licensed under
- * the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright (C) 2019 IBM.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
+ * file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -20,6 +22,7 @@ package org.onap.appc.adapter.iaas.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doThrow;
@@ -220,4 +223,15 @@ public class TestTenantCache {
public void testPoolsProperty() {
assertNotNull(tenantCache.getPools());
}
+
+ @Test
+ public void testProvider() {
+ tenantCache.setProvider(provider);
+ assertEquals(provider, tenantCache.getProvider());
+ }
+
+ @Test
+ public void testServiceCatalog() {
+ assertTrue(tenantCache.getServiceCatalog() instanceof ServiceCatalog);
+ }
}
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422