Skip to content

Commit 20b2027

Browse files
Update triageGetStates method to return CustomState and remove test ignore (#403)
Co-authored-by: AlvoBen <[email protected]>
1 parent f69a1a8 commit 20b2027

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/main/java/com/checkmarx/ast/wrapper/CxWrapper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public List<Predicate> triageShow(@NonNull UUID projectId, String similarityId,
166166
return Execution.executeCommand(withConfigArguments(arguments), logger, Predicate::listFromLine, Predicate::validator);
167167
}
168168

169-
public List<Predicate> triageGetStates(boolean all) throws IOException, InterruptedException, CxException {
169+
public List<CustomState> triageGetStates(boolean all) throws IOException, InterruptedException, CxException {
170170
this.logger.info("Executing 'triage get-states' command using the CLI.");
171171

172172
List<String> arguments = new ArrayList<>();
@@ -187,7 +187,6 @@ public void triageUpdate(@NonNull UUID projectId, String similarityId, String sc
187187
this.logger.info("Executing 'triage update' command using the CLI.");
188188
this.logger.info("Updating the similarityId {} with state {} with customStateId {} and severity {}.", similarityId, state, customStateId, severity);
189189

190-
boolean emptyState = state == null || state.isEmpty();
191190
boolean emptyCustomStateId = customStateId == null || customStateId.isEmpty();
192191

193192
List<String> arguments = new ArrayList<>();

src/test/java/com/checkmarx/ast/PredicateTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package com.checkmarx.ast;
22

3+
import com.checkmarx.ast.predicate.CustomState;
34
import com.checkmarx.ast.predicate.Predicate;
45
import com.checkmarx.ast.results.Results;
56
import com.checkmarx.ast.results.result.Result;
67
import com.checkmarx.ast.scan.Scan;
78
import com.checkmarx.ast.wrapper.CxConstants;
8-
import org.junit.Ignore;
99
import org.junit.jupiter.api.Assertions;
1010
import org.junit.jupiter.api.Disabled;
1111
import org.junit.jupiter.api.Test;
@@ -48,9 +48,8 @@ void testTriage() throws Exception {
4848
}
4949

5050
@Test
51-
@Disabled("Ignore this tests until get states api will be in production")
5251
void testGetStates() throws Exception {
53-
List<Predicate> states = wrapper.triageGetStates(false);
52+
List<CustomState> states = wrapper.triageGetStates(false);
5453
Assertions.assertNotNull(states);
5554
}
5655
}

0 commit comments

Comments
 (0)