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

com.relevantcodes.extentreports.markup.FontAwesomeIco Maven / Gradle / Ivy

There is a newer version: 2.41.2
Show newest version
/*
* Copyright (c) 2015, Anshoo Arora (Relevant Codes).  All rights reserved.
* 
* Copyrights licensed under the New BSD License.
* 
* See the accompanying LICENSE file for terms.
*/


package com.relevantcodes.extentreports.markup;

import java.util.HashMap;

import com.relevantcodes.extentreports.LogStatus;

public class FontAwesomeIco {
	private static HashMap map = new HashMap();
	
	public static void override(LogStatus status, String icon) {
		map.put(status, icon);
	}
	
	public static String get(LogStatus status) {
		if (map.containsKey(status))
	        return map.get(status);
		
		String s = status.toString().toLowerCase();
		
		if (s.equals(new String("fail"))) { return "times-circle-o"; }
		if (s.equals(new String("error"))) { return "exclamation-circle"; }
		if (s.equals(new String("fatal"))) { return "exclamation-circle"; }
		if (s.equals(new String("pass"))) { return "check-circle-o"; }
		if (s.equals(new String("info"))) { return "info-circle"; }
		if (s.equals(new String("warning"))) { return "warning"; }
		if (s.equals(new String("skip"))) { return "chevron-circle-right"; }

		return "question";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy