diff options
author | Ganesh <ganesh.c@samsung.com> | 2022-07-13 08:40:07 +0530 |
---|---|---|
committer | Ganesh <ganesh.c@samsung.com> | 2022-07-15 11:40:09 +0530 |
commit | edb8b9ebd33a2f99f606b33e0b056f28b35ec243 (patch) | |
tree | aee0c2411a55422dc395557f18f9dfd530be4d28 | |
parent | a313181a173ce8f15cf221ce1c888f9ea5b0f340 (diff) |
sonar issue, AuthenticationMethodTest use assertNotEquals instead
Signed-off-by: Ganesh <ganesh.c@samsung.com>
Change-Id: I737a0cfe04bcb2018120d897267c4fc8fb695fd2
Issue-ID: SO-3966
-rw-r--r-- | adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java index 41aac0084c..78b5c8ede9 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java @@ -3,6 +3,7 @@ * ONAP - SO * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2022 Samsung Electronics. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +23,7 @@ package org.onap.so.cloud.authentication; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertEquals; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; @@ -61,7 +62,7 @@ public class AuthenticationMethodTest { ci.setMsoId("test"); Authentication auth = authenticationMethodFactory.getAuthenticationFor(ci); - assertTrue(RackspaceAuthentication.class.equals(auth.getClass())); + assertEquals(RackspaceAuthentication.class, auth.getClass()); } @@ -73,7 +74,7 @@ public class AuthenticationMethodTest { ci.setMsoId("someuser"); Authentication auth = authenticationMethodFactory.getAuthenticationFor(ci); - assertTrue(UsernamePassword.class.equals(auth.getClass())); + assertEquals(UsernamePassword.class, auth.getClass()); } @@ -85,7 +86,7 @@ public class AuthenticationMethodTest { ci.setMsoId("test"); Authentication auth = authenticationMethodFactory.getAuthenticationFor(ci); - assertTrue(RackspaceAuthentication.class.equals(auth.getClass())); + assertEquals(RackspaceAuthentication.class, auth.getClass()); } @Test @@ -96,7 +97,7 @@ public class AuthenticationMethodTest { ci.setMsoId("someuser"); Authentication auth = authenticationMethodFactory.getAuthenticationFor(ci); - assertTrue(UsernamePassword.class.equals(auth.getClass())); + assertEquals(UsernamePassword.class, auth.getClass()); } |