com.aventstack.extentreports.viewdefs.MaterialIcon Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of htmlextentreporter Show documentation
Show all versions of htmlextentreporter Show documentation
HTML Reporter for Extent version 5
package com.aventstack.extentreports.viewdefs;
import java.util.EnumMap;
import java.util.Map;
import com.aventstack.extentreports.Status;
public class MaterialIcon {
private static Map map = new EnumMap<>(Status.class);
public void override(Status status, String icon) {
map.put(status, icon);
}
public String getIcon(Status status) {
if (map.containsKey(status))
return map.get(status);
String s = status.toString().toLowerCase();
switch (s) {
case "fail":
return "cancel";
case "fatal":
return "cancel";
case "error":
return "error";
case "warning":
return "warning";
case "skip":
return "redo";
case "pass":
return "check_circle";
case "debug":
return "low_priority";
case "info":
return "info_outline";
default:
return "help";
}
}
}