File tree Expand file tree Collapse file tree
core/src/main/kotlin/org/evomaster/core/output/auth Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ object TokenWriter {
5454 if (k.token!! .headerPrefix.isNotEmpty()) {
5555 lines.append(" \" ${k.token!! .headerPrefix} \" " )
5656 }else {
57- // if (format.isJavaScript() || format.isPython())
58- lines.append(" \"\" " )
57+ lines.append(" \"\" " )
5958 }
6059
6160 if (! format.isPython()) {
@@ -66,7 +65,6 @@ object TokenWriter {
6665 }
6766 }
6867
69-
7068 when {
7169 format.isJavaOrKotlin() -> lines.append(" given()" )
7270 format.isJavaScript() -> {
@@ -97,10 +95,11 @@ object TokenWriter {
9795 lines.indented { lines.add(" error => {console.log(error.response.body); throw Error(\" Auth failed.\" )});" ) }
9896 } else if (format.isPython()) {
9997 lines.add(" ${tokenName(k)} = ${tokenName(k)} + ${responseName(k)} .json()$path " )
100- }else if (format.isKotlin()) {
101- lines.add(" .then().extract().response().path(\" $path \" )!!" )
102- }else {
98+ }else if (format.isJavaOrKotlin()) {
10399 lines.add(" .then().extract().response().path(\" $path \" )" )
100+ if (format.isKotlin()) {
101+ lines.append(" !!" )
102+ }
104103 }
105104 lines.appendSemicolon()
106105 lines.addEmpty()
You can’t perform that action at this time.
0 commit comments