From 004da0667d0ef6ae735d6cdc7259650f831f9edd Mon Sep 17 00:00:00 2001 From: mengleang-ngoun Date: Thu, 18 Jan 2024 13:51:56 +0700 Subject: [PATCH] remove test case function name --- .../services/ChallengeManagerServiceTest.java | 2 +- .../services/RegistrationServiceTest.java | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/signup-service/src/test/java/io/mosip/signup/services/ChallengeManagerServiceTest.java b/signup-service/src/test/java/io/mosip/signup/services/ChallengeManagerServiceTest.java index f8c87dd9..8003aa8f 100644 --- a/signup-service/src/test/java/io/mosip/signup/services/ChallengeManagerServiceTest.java +++ b/signup-service/src/test/java/io/mosip/signup/services/ChallengeManagerServiceTest.java @@ -66,7 +66,7 @@ public void doGenerateChallenge_allValid_thenPass() throws SignUpException { } @Test - public void doGenerateChallenge_withUnsupportedChallengeType_thenPass() throws SignUpException { + public void doGenerateChallenge_withUnsupportedChallengeType_thenFail() throws SignUpException { RegistrationTransaction transaction = new RegistrationTransaction("+85577410541", Purpose.REGISTRATION); ReflectionTestUtils.setField(challengeManagerService, "supportedGenerateChallengeType", "TELEGRAM"); try{ diff --git a/signup-service/src/test/java/io/mosip/signup/services/RegistrationServiceTest.java b/signup-service/src/test/java/io/mosip/signup/services/RegistrationServiceTest.java index e19f3940..20f982f0 100644 --- a/signup-service/src/test/java/io/mosip/signup/services/RegistrationServiceTest.java +++ b/signup-service/src/test/java/io/mosip/signup/services/RegistrationServiceTest.java @@ -18,7 +18,6 @@ import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; @@ -533,7 +532,7 @@ public void doVerifyChallenge_withInvalidFormatForOTPChallenge_thenFail() { } @Test - public void doVerifyChallengeInResetPassword_thenIdentityInactive_throwException() { + public void doVerifyChallengeInResetPassword_withInactiveIdentity_throwException() { ChallengeInfo challengeInfoKBA = new ChallengeInfo(); challengeInfoKBA.setFormat("base64url-encoded-json"); @@ -643,7 +642,7 @@ public void doVerifyChallengeInResetPassword_withKBAChallengeNotFound_throwExcep } @Test - public void doVerifyChallengeInResetPassword_thenFetchIdentityFailed_throwException() { + public void doVerifyChallengeInResetPassword_whenFetchIdentityFail_throwException() { ChallengeInfo challengeInfoKBA = new ChallengeInfo(); challengeInfoKBA.setFormat("base64url-encoded-json"); @@ -867,7 +866,7 @@ public void register_thenUinEndpointResponseNullBody_throwException() throws Exc } @Test - public void register_thenUinEndpointResponseNullUIN_throwException() throws Exception{ + public void register_whenUinEndpointResponseNullUIN_throwException() throws Exception{ UserInfoMap userInfo = new UserInfoMap(); userInfo.setPreferredLang("khm"); userInfo.setFullName(List.of(new LanguageTaggedValue("eng", "Panharith AN"))); @@ -1090,7 +1089,7 @@ public void register_thenGenerateHashEndpointResponseErrors_throwException() thr } @Test - public void register_thenGenerateHashEndpointResponseNullErrors_throwException() throws Exception{ + public void register_whenGenerateHashEndpointResponseNullErrors_throwException() throws Exception{ UserInfoMap userInfo = new UserInfoMap(); userInfo.setPreferredLang("khm"); userInfo.setFullName(List.of(new LanguageTaggedValue("eng", "Panharith AN"))); @@ -1141,7 +1140,7 @@ public void register_thenGenerateHashEndpointResponseNullErrors_throwException() } @Test - public void register_thenGenerateHashEndpointResponseNullSaltedPassword_throwException() throws Exception{ + public void register_whenGenerateHashEndpointResponseNullSaltedPassword_throwException() throws Exception{ UserInfoMap userInfo = new UserInfoMap(); userInfo.setPreferredLang("khm"); userInfo.setFullName(List.of(new LanguageTaggedValue("eng", "Panharith AN"))); @@ -1195,7 +1194,7 @@ public void register_thenGenerateHashEndpointResponseNullSaltedPassword_throwExc } @Test - public void register_thenGenerateHashEndpointResponseNullSalted_throwException() throws Exception{ + public void register_whenGenerateHashEndpointResponseNullSalted_throwException() throws Exception{ UserInfoMap userInfo = new UserInfoMap(); userInfo.setPreferredLang("khm"); userInfo.setFullName(List.of(new LanguageTaggedValue("eng", "Panharith AN"))); @@ -1308,7 +1307,7 @@ public void register_thenAddIdentityEndpointResponseNullBody_throwException() th } @Test - public void register_thenAddIdentityEndpointResponseStatusNotEqualsACTIVATED_throwException() throws Exception{ + public void register_whenAddIdentityEndpointResponseStatusNotEqualsACTIVATED_throwException() throws Exception{ UserInfoMap userInfo = new UserInfoMap(); userInfo.setPreferredLang("khm"); userInfo.setFullName(List.of(new LanguageTaggedValue("eng", "Panharith AN"))); @@ -1369,7 +1368,7 @@ public void register_thenAddIdentityEndpointResponseStatusNotEqualsACTIVATED_thr } @Test - public void register_thenAddIdentityEndpointResponseErrors_throwException() throws Exception { + public void register_whenAddIdentityEndpointResponseErrors_throwException() throws Exception { UserInfoMap userInfo = new UserInfoMap(); userInfo.setPreferredLang("khm"); userInfo.setFullName(List.of(new LanguageTaggedValue("eng", "Panharith AN"))); @@ -1432,7 +1431,7 @@ public void register_thenAddIdentityEndpointResponseErrors_throwException() thro } @Test - public void register_thenAddIdentityEndpointResponseNullErrors_throwException() throws Exception{ + public void register_whenAddIdentityEndpointResponseNullErrors_throwException() throws Exception{ UserInfoMap userInfo = new UserInfoMap(); userInfo.setPreferredLang("khm"); userInfo.setFullName(List.of(new LanguageTaggedValue("eng", "Panharith AN")));