Untitled
vas
plain_text
9 months ago
2.3 kB
4
Indexable
@SpringBootTest
@ActiveProfiles("local")
@ExtendWith(MockitoExtension.class)
public class GoalServiceTest {
private MockWebServer mockWebServer;
@Autowired
GoalService goalService;
@BeforeEach
void setUp() throws IOException {
mockWebServer = new MockWebServer();
mockWebServer.start(8507);
testDataForSysconfigValuesMap();
}
@AfterEach
void tearDown() throws IOException {
mockWebServer.shutdown();
try {
TimeUnit.MILLISECONDS.sleep(500);
}catch (InterruptedException e) {
e.getStackTrace();
}
}
public static void testDataForSysconfigValuesMap() throws JsonProcessingException {
ObjectMapper mapper = new ObjectMapper();
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.APPID_WEBAPP, mapper.readTree(AppTestConstants.APPID_WEBAPP_RESP));
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.APPID_ORION, mapper.readTree(AppTestConstants.APPID_ORION_RESP));
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.APPID_ORION_HYDRATION, mapper.readTree(AppTestConstants.ORION_HYDRATION_RESP));
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.FRANKLIN_VOID_NATURAL, mapper.readTree(AppTestConstants.FRANKLIN_VOID_NATURAL_RESP));
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.HYDRATION_OBSERVATION_TYPE22, mapper.readTree(AppTestConstants.HYDRATION_OBSERVATION_TYPE22_RESP));
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.APPID_FRANKLIN, mapper.readTree(AppTestConstants.APPID_FRANKLIN_RESP));
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.FRANKLIN_VOID_LEAK, mapper.readTree(AppTestConstants.FRANKLIN_VOID_LEAK_RESP));
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.FRANKLIN_HYDRATION, mapper.readTree(AppTestConstants.FRANKLIN_HYDRATION_RESP));
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.ORION_POUCH_CHANGE, mapper.readTree(AppTestConstants.ORION_POUCH_CHANGE_RESP));
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.FRANKLIN_VOID_CATHETER, mapper.readTree(AppTestConstants.FRANKLIN_VOID_CATHETER_RESP));
CdrServiceApplication.sysconfigValuesMap.put(AppTestConstants.NUTRITION_INPUT, mapper.readTree(AppTestConstants.NUTRITION_INPUT_RESP));
}Editor is loading...
Leave a Comment