MCPcopy Create free account
hub / github.com/EsperoTech/yaade / getEvent

Method getEvent

server/src/main/java/com/postman/collection/Item.java:214–224  ·  view source on GitHub ↗

Get an event, specifying whether to return the pre-request script or test script associated with this item. @param evtType Enumerated value for the event type, eg., pre-request or test. @return Event The event, if it exists

(enumEventType evtType)

Source from the content-addressed store, hash-verified

212 * @return Event The event, if it exists
213 */
214 public Event getEvent(enumEventType evtType) {
215 if (event == null) {
216 return null;
217 }
218 for (int i = 0; i < event.size(); i++) {
219 if (event.get(i).getEventType() == evtType) {
220 return event.get(i);
221 }
222 }
223 return null;
224 }
225
226
227 /**

Callers 3

addEventMethod · 0.95
getPreRequestScriptMethod · 0.95
getTestScriptMethod · 0.95

Calls 2

getEventTypeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected