Skip to content

Commit 0c7f4ac

Browse files
authored
change auth test case during failure (#145)
1 parent 60c6873 commit 0c7f4ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
package com.checkmarx.ast;
22

33
import com.checkmarx.ast.wrapper.CxConfig;
4+
import com.checkmarx.ast.wrapper.CxConstants;
45
import com.checkmarx.ast.wrapper.CxException;
56
import com.checkmarx.ast.wrapper.CxWrapper;
67
import org.junit.jupiter.api.Assertions;
78
import org.junit.jupiter.api.Test;
89

910
import java.io.IOException;
11+
import java.lang.reflect.Field;
12+
import java.util.Map;
1013

1114
class AuthTest extends BaseTest {
12-
1315
@Test
1416
void testAuthValidate() throws CxException, IOException, InterruptedException {
1517
Assertions.assertNotNull(wrapper.authValidate());
@@ -19,6 +21,7 @@ void testAuthValidate() throws CxException, IOException, InterruptedException {
1921
void testAuthFailure() {
2022
CxConfig cxConfig = getConfig();
2123
cxConfig.setBaseAuthUri("wrongAuth");
24+
cxConfig.setApiKey("InvalidApiKey");
2225
Assertions.assertThrows(CxException.class, () -> new CxWrapper(cxConfig, getLogger()).authValidate());
2326
}
2427
}

0 commit comments

Comments
 (0)