-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctionsCoreApiTest.java
More file actions
234 lines (214 loc) · 7.73 KB
/
FunctionsCoreApiTest.java
File metadata and controls
234 lines (214 loc) · 7.73 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
/*
* RevEng.AI API
* RevEng.AI is Similarity Search Engine for executable binaries
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package ai.reveng.api;
import ai.reveng.invoker.ApiException;
import ai.reveng.model.AiUnstripRequest;
import ai.reveng.model.AnalysisFunctionMatchingRequest;
import ai.reveng.model.AutoUnstripRequest;
import ai.reveng.model.AutoUnstripResponse;
import ai.reveng.model.BaseResponse;
import ai.reveng.model.BaseResponseAnalysisStringsResponse;
import ai.reveng.model.BaseResponseAnalysisStringsStatusResponse;
import ai.reveng.model.BaseResponseCalleesCallerFunctionsResponse;
import ai.reveng.model.BaseResponseFunctionBlocksResponse;
import ai.reveng.model.BaseResponseFunctionCapabilityResponse;
import ai.reveng.model.BaseResponseFunctionStringsResponse;
import ai.reveng.model.BaseResponseFunctionsDetailResponse;
import ai.reveng.model.FunctionMatchingRequest;
import ai.reveng.model.FunctionMatchingResponse;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for FunctionsCoreApi
*/
@Disabled
public class FunctionsCoreApiTest {
private final FunctionsCoreApi api = new FunctionsCoreApi();
/**
* Performs matching and auto-unstrip for an analysis and its functions
*
* Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function groups for each function that's within the system
*
* @throws ApiException if the Api call fails
*/
@Test
public void aiUnstripTest() throws ApiException {
Integer analysisId = null;
AiUnstripRequest aiUnstripRequest = null;
AutoUnstripResponse response = api.aiUnstrip(analysisId, aiUnstripRequest);
// TODO: test validations
}
/**
* Perform matching for the functions of an analysis
*
* Takes in an analysis id and settings and matches the nearest functions to the ones associated with it. Results can optionally be filtered by collection, binary, debug type or (other) function ids
*
* @throws ApiException if the Api call fails
*/
@Test
public void analysisFunctionMatchingTest() throws ApiException {
Integer analysisId = null;
AnalysisFunctionMatchingRequest analysisFunctionMatchingRequest = null;
FunctionMatchingResponse response = api.analysisFunctionMatching(analysisId, analysisFunctionMatchingRequest);
// TODO: test validations
}
/**
* Performs matching and auto-unstrip for an analysis and its functions
*
* Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function for each function that's within the system
*
* @throws ApiException if the Api call fails
*/
@Test
public void autoUnstripTest() throws ApiException {
Integer analysisId = null;
AutoUnstripRequest autoUnstripRequest = null;
AutoUnstripResponse response = api.autoUnstrip(analysisId, autoUnstripRequest);
// TODO: test validations
}
/**
* Perform function matching for an arbitrary batch of functions, binaries or collections
*
* Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the system
*
* @throws ApiException if the Api call fails
*/
@Test
public void batchFunctionMatchingTest() throws ApiException {
FunctionMatchingRequest functionMatchingRequest = null;
FunctionMatchingResponse response = api.batchFunctionMatching(functionMatchingRequest);
// TODO: test validations
}
/**
* Cancels a running ai-unstrip
*
* Takes in the analysis ID and cancels a running ai-unstrip operation
*
* @throws ApiException if the Api call fails
*/
@Test
public void cancelAiUnstripTest() throws ApiException {
Integer analysisId = null;
AutoUnstripResponse response = api.cancelAiUnstrip(analysisId);
// TODO: test validations
}
/**
* Cancels a running auto-unstrip
*
* Takes in the analysis ID and cancels a running auto-unstrip operation
*
* @throws ApiException if the Api call fails
*/
@Test
public void cancelAutoUnstripTest() throws ApiException {
Integer analysisId = null;
AutoUnstripResponse response = api.cancelAutoUnstrip(analysisId);
// TODO: test validations
}
/**
* Get string information found in the Analysis
*
* Get string information found in the analysis
*
* @throws ApiException if the Api call fails
*/
@Test
public void getAnalysisStringsTest() throws ApiException {
Integer analysisId = null;
Integer page = null;
Integer pageSize = null;
String search = null;
String functionSearch = null;
String orderBy = null;
String sortOrder = null;
BaseResponseAnalysisStringsResponse response = api.getAnalysisStrings(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder);
// TODO: test validations
}
/**
* Get string processing state for the Analysis
*
* Get string processing state for the Analysis
*
* @throws ApiException if the Api call fails
*/
@Test
public void getAnalysisStringsStatusTest() throws ApiException {
Integer analysisId = null;
BaseResponseAnalysisStringsStatusResponse response = api.getAnalysisStringsStatus(analysisId);
// TODO: test validations
}
/**
* Get disassembly blocks related to the function
*
* Get disassembly blocks related to the function
*
* @throws ApiException if the Api call fails
*/
@Test
public void getFunctionBlocksTest() throws ApiException {
Integer functionId = null;
BaseResponseFunctionBlocksResponse response = api.getFunctionBlocks(functionId);
// TODO: test validations
}
/**
* Get list of functions that call or are called by the specified function
*
* @throws ApiException if the Api call fails
*/
@Test
public void getFunctionCalleesCallersTest() throws ApiException {
Integer functionId = null;
BaseResponseCalleesCallerFunctionsResponse response = api.getFunctionCalleesCallers(functionId);
// TODO: test validations
}
/**
* Retrieve a functions capabilities
*
* @throws ApiException if the Api call fails
*/
@Test
public void getFunctionCapabilitiesTest() throws ApiException {
Integer functionId = null;
BaseResponseFunctionCapabilityResponse response = api.getFunctionCapabilities(functionId);
// TODO: test validations
}
/**
* Get function details
*
* @throws ApiException if the Api call fails
*/
@Test
public void getFunctionDetailsTest() throws ApiException {
Integer functionId = null;
BaseResponseFunctionsDetailResponse response = api.getFunctionDetails(functionId);
// TODO: test validations
}
/**
* Get string information found in the function
*
* Get string information found in the function
*
* @throws ApiException if the Api call fails
*/
@Test
public void getFunctionStringsTest() throws ApiException {
Integer functionId = null;
Integer page = null;
Integer pageSize = null;
String search = null;
BaseResponseFunctionStringsResponse response = api.getFunctionStrings(functionId, page, pageSize, search);
// TODO: test validations
}
}