-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathHoverflyClient.java
More file actions
96 lines (71 loc) · 2.38 KB
/
HoverflyClient.java
File metadata and controls
96 lines (71 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package io.specto.hoverfly.junit.api;
import com.fasterxml.jackson.databind.JsonNode;
import io.specto.hoverfly.junit.api.command.SortParams;
import io.specto.hoverfly.junit.api.model.ModeArguments;
import io.specto.hoverfly.junit.api.view.DiffView;
import io.specto.hoverfly.junit.api.view.HoverflyInfoView;
import io.specto.hoverfly.junit.api.view.StateView;
import io.specto.hoverfly.junit.core.HoverflyMode;
import io.specto.hoverfly.junit.core.model.Journal;
import io.specto.hoverfly.junit.core.model.Request;
import io.specto.hoverfly.junit.core.model.Simulation;
/**
* Http client for querying Hoverfly admin endpoints
*/
public interface HoverflyClient {
void setSimulation(Simulation simulation);
void setSimulation(String simulation);
Simulation getSimulation();
/**
* Get the simulation from Hoverfly as {@link JsonNode}
* @return simulation data as {@link JsonNode}
*/
JsonNode getSimulationJson();
void deleteSimulation();
Journal getJournal(int offset, int limit);
Journal getJournal(int offset, int limit, SortParams sortParams);
Journal searchJournal(Request request);
void deleteJournal();
/**
* Deletes all state from Hoverfly.
*/
void deleteState();
/**
* Gets the state from Hoverfly.
*
* @return the {@link StateView}
*/
StateView getState();
/**
* Deletes all state from Hoverfly and then sets the state with the specified {@link StateView}.
*
* @param stateView the {@link StateView}
*/
void setState(StateView stateView);
/**
* Updates state in Hoverfly. Will update each state key referenced in the specified {@link StateView}.
*
* @param stateView the {@link StateView}
*/
void updateState(StateView stateView);
DiffView getDiffs();
void cleanDiffs();
HoverflyInfoView getConfigInfo();
void setDestination(String destination);
/**
* Update Hoverfly mode
* @param mode {@link HoverflyMode}
*/
void setMode(HoverflyMode mode);
/**
* Update Hoverfly mode with additional arguments
* @param mode {@link HoverflyMode}
* @param modeArguments additional arguments such as headers to capture
*/
void setMode(HoverflyMode mode, ModeArguments modeArguments);
/**
* Check Hoverfly is healthy
* @return the status of Hoverfly
*/
boolean getHealth();
}