From aae8aa2863bb56454af26b867dc13d1c6c61f5f6 Mon Sep 17 00:00:00 2001 From: Jay Nanduri Date: Tue, 9 Aug 2022 14:22:52 -0400 Subject: [PATCH] change auth test case during failure --- src/test/java/com/checkmarx/ast/AuthTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()); } }