diff --git a/src/test/java/com/checkmarx/ast/AuthTest.java b/src/test/java/com/checkmarx/ast/AuthTest.java index f996f5f5..d5a12554 100644 --- a/src/test/java/com/checkmarx/ast/AuthTest.java +++ b/src/test/java/com/checkmarx/ast/AuthTest.java @@ -1,15 +1,17 @@ package com.checkmarx.ast; import com.checkmarx.ast.wrapper.CxConfig; +import com.checkmarx.ast.wrapper.CxConstants; import com.checkmarx.ast.wrapper.CxException; import com.checkmarx.ast.wrapper.CxWrapper; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import java.io.IOException; +import java.lang.reflect.Field; +import java.util.Map; class AuthTest extends BaseTest { - @Test void testAuthValidate() throws CxException, IOException, InterruptedException { Assertions.assertNotNull(wrapper.authValidate()); @@ -19,6 +21,7 @@ void testAuthValidate() throws CxException, IOException, InterruptedException { void testAuthFailure() { CxConfig cxConfig = getConfig(); cxConfig.setBaseAuthUri("wrongAuth"); + cxConfig.setApiKey("InvalidApiKey"); Assertions.assertThrows(CxException.class, () -> new CxWrapper(cxConfig, getLogger()).authValidate()); } }