Skip to content

Commit

Permalink
fixed the test cases
Browse files Browse the repository at this point in the history
Signed-off-by: GOKULRAJ136 <[email protected]>
  • Loading branch information
GOKULRAJ136 committed Jan 23, 2024
1 parent ba5c514 commit ec7715c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
import java.util.List;
import java.util.Map;

import io.mosip.pms.device.util.AuditUtil;
import io.mosip.pms.oidc.client.contant.ClientServiceAuditEnum;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
Expand Down Expand Up @@ -56,6 +59,9 @@ public class ClientManagementServiceImplTest {

Map<String, Object> public_key;

@MockBean
AuditUtil auditUtil;

@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
Expand All @@ -82,11 +88,12 @@ public void createClientTest() throws Exception {
request.setAuthPartnerId("authPartnerId");
List<String> clientAuthMethods = new ArrayList<String>();
clientAuthMethods.add("ClientAuthMethod");
request.setClientAuthMethods(clientAuthMethods);;
request.setClientAuthMethods(clientAuthMethods);
request.setGrantTypes(clientAuthMethods);
request.setLogoUri("https://testcase.pms.net/browse/OIDCClient.png");
request.setRedirectUris(clientAuthMethods);
request.setName("ClientName");
Mockito.doNothing().when(auditUtil).setAuditRequestDto(Mockito.any(ClientServiceAuditEnum.class));
try {
serviceImpl.createOIDCClient(request);
}catch (PartnerServiceException e) {
Expand Down

0 comments on commit ec7715c

Please sign in to comment.