Search in sources :

Example 66 with AbstractBestPracticeResult

use of com.att.aro.core.bestpractice.pojo.AbstractBestPracticeResult in project VideoOptimzer by attdevsupport.

the class BestPracticeResultsListener method getBPSummaryRows.

private List<List<Object>> getBPSummaryRows() {
    int pass = 0;
    int fail = 0;
    int warning = 0;
    int selftest = 0;
    int configure = 0;
    int nodata = 0;
    for (AbstractBestPracticeResult result : traceData.getBestPracticeResults()) {
        switch(result.getResultType()) {
            case PASS:
                ++pass;
                break;
            case FAIL:
                ++fail;
                break;
            case WARNING:
                ++warning;
                break;
            case SELF_TEST:
                ++selftest;
                break;
            case CONFIG_REQUIRED:
                ++configure;
                break;
            case NO_DATA:
                ++nodata;
                break;
            default:
                break;
        }
    }
    List<List<Object>> data = new ArrayList<>();
    data.add(Arrays.asList(getFontStyledColumn(BPResultType.PASS.getDescription()), pass));
    data.add(Arrays.asList(getFontStyledColumn(BPResultType.FAIL.getDescription()), fail));
    data.add(Arrays.asList(getFontStyledColumn(BPResultType.WARNING.getDescription()), warning));
    data.add(Arrays.asList(getFontStyledColumn(BPResultType.SELF_TEST.getDescription()), selftest));
    data.add(Arrays.asList(getFontStyledColumn(BPResultType.CONFIG_REQUIRED.getDescription()), configure));
    data.add(Arrays.asList(getFontStyledColumn(BPResultType.NO_DATA.getDescription()), nodata));
    return data;
}
Also used : AbstractBestPracticeResult(com.att.aro.core.bestpractice.pojo.AbstractBestPracticeResult) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

AbstractBestPracticeResult (com.att.aro.core.bestpractice.pojo.AbstractBestPracticeResult)66 BaseTest (com.att.aro.core.BaseTest)47 ArrayList (java.util.ArrayList)47 Test (org.junit.Test)47 Session (com.att.aro.core.packetanalysis.pojo.Session)33 HttpRequestResponseInfo (com.att.aro.core.packetanalysis.pojo.HttpRequestResponseInfo)29 PacketAnalyzerResult (com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult)17 Burst (com.att.aro.core.packetanalysis.pojo.Burst)8 BestPracticeType (com.att.aro.core.bestpractice.pojo.BestPracticeType)6 CacheEntry (com.att.aro.core.packetanalysis.pojo.CacheEntry)6 List (java.util.List)6 IBestPractice (com.att.aro.core.bestpractice.IBestPractice)5 BPResultType (com.att.aro.core.bestpractice.pojo.BPResultType)4 UnnecessaryConnectionResult (com.att.aro.core.bestpractice.pojo.UnnecessaryConnectionResult)4 BufferOccupancyResult (com.att.aro.core.bestpractice.pojo.BufferOccupancyResult)3 TsharkException (com.att.aro.core.exception.TsharkException)3 BurstCollectionAnalysisData (com.att.aro.core.packetanalysis.pojo.BurstCollectionAnalysisData)3 TraceDirectoryResult (com.att.aro.core.packetanalysis.pojo.TraceDirectoryResult)3 AROTraceData (com.att.aro.core.pojo.AROTraceData)3 IOException (java.io.IOException)3