Skip to content

Commit db2adae

Browse files
committed
[os_separator_fix] - add fix for os-dependant separators
1 parent 53ea4a4 commit db2adae

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/main/java/net/itarray/automotion/internal/HtmlReportBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ private void writeReport(String reportName) throws IOException, ParseException {
6363
long ms = System.currentTimeMillis();
6464
String uuid = Helper.getGeneratedStringWithLength(7);
6565

66-
String statusFolder = "success/";
66+
String statusFolder = "success" + File.separator;
6767
if (failuresCounter > 0) {
68-
statusFolder = "failure/";
68+
statusFolder = "failure" + File.separator;
6969
}
7070

7171
File report = new File(TARGET_AUTOMOTION_HTML + statusFolder + reportName.replace(" ", "_") + "-" + ms + uuid + ".html");

src/main/java/net/itarray/automotion/tools/helpers/Helper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static String getTodayDate() {
3131
public static File createFile(String filename) throws IOException, AWTException {
3232
File file;
3333
try {
34-
file = new File("target/" + filename);
34+
file = new File("target" + File.separator + filename);
3535
} catch (Exception ex) {
3636
file = new File(filename);
3737
}

src/main/java/net/itarray/automotion/validation/Constants.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package net.itarray.automotion.validation;
22

3+
import java.io.File;
4+
35
public class Constants {
46
public static final String X = "x";
57
public static final String Y = "y";
@@ -16,8 +18,8 @@ public class Constants {
1618
public static final String ROOT_ELEMENT = "rootElement";
1719
public static final String SCENARIO = "scenario";
1820
public static final String TIME_EXECUTION = "timeExecution";
19-
public static final String TARGET_AUTOMOTION_JSON = "target/automotion/json/";
20-
public static final String TARGET_AUTOMOTION_IMG = "target/automotion/img/";
21-
public static final String TARGET_AUTOMOTION = "target/automotion/";
22-
public static final String TARGET_AUTOMOTION_HTML = "target/automotion/html/";
21+
public static final String TARGET_AUTOMOTION = "target" + File.separator + "automotion" + File.separator;
22+
public static final String TARGET_AUTOMOTION_JSON = TARGET_AUTOMOTION + "json" + File.separator;
23+
public static final String TARGET_AUTOMOTION_IMG = TARGET_AUTOMOTION + "img" + File.separator;
24+
public static final String TARGET_AUTOMOTION_HTML = TARGET_AUTOMOTION + "html" + File.separator;
2325
}

0 commit comments

Comments
 (0)