From d3a9993cd802aafa808d3bbdea212d10540fa635 Mon Sep 17 00:00:00 2001 From: Onur D Date: Mon, 16 Oct 2023 18:00:40 +0200 Subject: [PATCH] Fixed one test case based on the operating system in order to generate the exception "URI path component is empty". Also, attempted to make tests run and pass both in windows and linux by changing the file separator if the OS is Windows. --- .../evomaster/core/problem/rest/OpenAPILocalURLIssueTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/OpenAPILocalURLIssueTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/OpenAPILocalURLIssueTest.kt index 09e6bd3458..e0fe56d345 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/OpenAPILocalURLIssueTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/OpenAPILocalURLIssueTest.kt @@ -189,8 +189,8 @@ class OpenAPILocalURLIssueTest { // The file path provided for the OpenAPI Schema file://./src/test/resources/swagger/openapi_pet.json, ended up with the following error: URI authority component has undefined host if (hostOs.contains("win")) { - Assertions.assertTrue(exception.message!!.contains("The file path provided for the OpenAPI Schema " + - "$urlToTest," + " ended up with the following error: URI authority component has undefined host")) + Assertions.assertTrue(exception.message!!.contains("The provided swagger file " + + "does not exist: $urlToTest")) } else { Assertions.assertTrue(exception.message!!.contains("The file path provided for the OpenAPI Schema " +