| 1 28 29 package com.idaremedia.antx.capture.tests; 30 31 import java.io.Reader ; 32 import java.util.Properties ; 33 34 import com.idaremedia.antx.AntX; 35 import com.idaremedia.antx.capture.InterpretParameters; 36 import com.idaremedia.antx.capture.LogInterpreter; 37 import com.idaremedia.antx.capture.ResultsHelper; 38 39 48 49 public final class AlwaysTold implements LogInterpreter 50 { 51 54 public AlwaysTold() 55 { 56 } 57 58 59 62 public String interpret(Reader inputr, InterpretParameters clnt) 63 { 64 Properties argv = clnt.getInstructions(); 65 String result = argv.getProperty("result"); 66 AntX.require_(result!=null,"AlwaysTold:","result specified"); 67 result = normalize(result); 68 ResultsHelper.set(clnt, 69 argv.getProperty("errorcount","UNDEFINED"), 70 argv.getProperty("warningcount","UNDEFINED"), 71 result); 72 return result; 73 } 74 75 76 private String normalize(String result) 77 { 78 if (CLEAN.equals(result)) { 79 return CLEAN; 80 } 81 if (FAILURE.equals(result)) { 82 return FAILURE; 83 } 84 if (PROBLEM.equals(result)) { 85 return PROBLEM; 86 } 87 return result; 88 } 89 } 90 91 | Popular Tags |