All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aventstack.extentreports.viewdefs.MaterialIcon Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
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";
	    }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy