Skip to content
Permalink
Browse files

removed warning message that ended up in the generated tests

  • Loading branch information...
arcuri82 committed Jul 5, 2019
1 parent ee6d8c6 commit a6a6e45be239512e0f7bf620bab1c6ce77b5c960
Showing with 6 additions and 3 deletions.
  1. +6 −3 core/src/main/kotlin/org/evomaster/core/output/TestCaseWriter.kt
@@ -592,15 +592,18 @@ class TestCaseWriter {
* TODO: get the type from the REST call
*/

if (call.produces.isEmpty() || res.getBodyType() == null) return ".accept(\"*/*\")"
if (call.produces.isEmpty() || res.getBodyType() == null){
return ".accept(\"*/*\")"
}

//if (call.produces.contains(res.getBodyType().toString())) return ".accept(${res.getBodyType().toString()})"
val accepted = call.produces.filter { res.getBodyType().toString().contains(it, true) }

if (accepted.size == 1)
return ".accept(\"${accepted.first()}\")"
else
return ".accept(\"*/*\") // NOTE: there seems to have been something or a problem"
//return ".accept(\"*/*\")"
//FIXME: there seems to have been something or a problem
return ".accept(\"*/*\")"
}

private fun handleExpectations(result: RestCallResult, lines: Lines, active: Boolean) {

0 comments on commit a6a6e45

Please sign in to comment.
You can’t perform that action at this time.