From 89b08af633c1c45965ad16418e5d238e045c4f00 Mon Sep 17 00:00:00 2001 From: Lars Langhans Date: Tue, 9 Feb 2010 11:20:00 +0100 Subject: qadev40: #161119# refactoring --- qadevOOo/runner/stats/Summarizer.java | 65 ++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 21 deletions(-) (limited to 'qadevOOo/runner/stats') diff --git a/qadevOOo/runner/stats/Summarizer.java b/qadevOOo/runner/stats/Summarizer.java index 6b9aebdec06c..15f0e0b54c59 100644 --- a/qadevOOo/runner/stats/Summarizer.java +++ b/qadevOOo/runner/stats/Summarizer.java @@ -27,7 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - package stats; import java.util.Vector; @@ -38,57 +37,81 @@ import share.DescEntry; * this class summs up the results of the subentries of a given DescEntry
* and fills the subentries in cases of SKIPPED states */ -public class Summarizer { +public class Summarizer +{ /** * * gets the state for a SuperEntry according to its subentries * @param entry */ - public void summarizeUp(DescEntry entry) { - if ( ( entry.State != null ) && !entry.State.equals("UNKNOWN")) return; + public void summarizeUp(DescEntry entry) + { + if ((entry.State != null) && !entry.State.equals("UNKNOWN")) + { + return; + } int count = entry.SubEntryCount; int knownIssues = 0; Vector failures = new Vector(); Vector states = new Vector(); - for (int i=0; i0) { + if (failures.size() > 0) + { String errMsg = ""; String state = "PASSED.FAILED"; - for (int j=0; j 0) { + } + else if (entry.EntryType.equals("component") && knownIssues > 0) + { entry.State = "PASSED(with known issues).OK"; - } else { + } + else + { entry.State = "PASSED.OK"; } } - public static void summarizeDown(DescEntry entry, String state) { - if ( ( entry.State == null ) || entry.State.equals("UNKNOWN")) + public static void summarizeDown(DescEntry entry, String state) + { + if ((entry.State == null) || entry.State.equals("UNKNOWN")) + { entry.State = state; - for (int i=0; i