Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed test #37

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

import java.io.IOException;
import java.lang.reflect.Field;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import io.mosip.kernel.core.exception.ExceptionUtils;
import io.mosip.registration.processor.opencrvs.stage.OpencrvsStage;
import org.json.simple.JSONObject;
import org.junit.Before;
import org.junit.Test;
Expand All @@ -31,8 +33,10 @@
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import io.mosip.kernel.core.exception.ExceptionUtils;
import io.mosip.kernel.core.exception.ServiceError;
import io.mosip.registration.processor.core.abstractverticle.EventDTO;
import io.mosip.registration.processor.core.abstractverticle.HealthCheckDTO;
import io.mosip.registration.processor.core.abstractverticle.MessageBusAddress;
import io.mosip.registration.processor.core.abstractverticle.MessageDTO;
import io.mosip.registration.processor.core.abstractverticle.MosipEventBus;
Expand All @@ -53,6 +57,7 @@
import io.mosip.registration.processor.core.spi.eventbus.EventHandler;
import io.mosip.registration.processor.core.spi.restclient.RegistrationProcessorRestClientService;
import io.mosip.registration.processor.core.util.PropertiesUtil;
import io.mosip.registration.processor.opencrvs.stage.OpencrvsStage;
import io.mosip.registration.processor.packet.storage.utils.Utilities;
import io.mosip.registration.processor.rest.client.audit.builder.AuditLogRequestBuilder;
import io.mosip.registration.processor.rest.client.audit.dto.AuditResponseDto;
Expand Down Expand Up @@ -134,6 +139,18 @@ public void consumeAndSend(MessageBusAddress fromAddress, MessageBusAddress toAd
public void send(MessageBusAddress toAddress, MessageDTO message) {

}

@Override
public void consumerHealthCheck(Handler<HealthCheckDTO> eventHandler, String address) {
// TODO Auto-generated method stub

}

@Override
public void senderHealthCheck(Handler<HealthCheckDTO> eventHandler, String address) {
// TODO Auto-generated method stub

}
};
}

Expand Down Expand Up @@ -216,7 +233,7 @@ public void setup() throws Exception {
Map<String, String> map1 = new HashMap<>();
map1.put("UIN", "4238135072");
JSONObject jsonObject = new JSONObject(map1);
Mockito.when(utitilites.retrieveUIN(any())).thenReturn(jsonObject);
Mockito.when(utitilites.retrieveIdrepoJson(any())).thenReturn(jsonObject);



Expand Down Expand Up @@ -352,7 +369,7 @@ public void testUINNotavailable()
Map<String, String> map1 = new HashMap<>();

JSONObject jsonObject = new JSONObject(map1);
Mockito.when(utitilites.retrieveUIN(any())).thenReturn(jsonObject);
Mockito.when(utitilites.retrieveIdrepoJson(any())).thenReturn(jsonObject);
MessageDTO result = stage.process(dto);

assertFalse(result.getIsValid());
Expand Down
Loading