Lines 29-39
Link Here
|
29 |
*/ |
29 |
*/ |
30 |
final class TestsuiteNode extends AbstractNode { |
30 |
final class TestsuiteNode extends AbstractNode { |
31 |
|
31 |
|
32 |
private final String suiteName; |
32 |
private String suiteName; |
33 |
private Report report; |
33 |
private Report report; |
34 |
private boolean filtered; |
34 |
private boolean filtered; |
35 |
|
35 |
|
36 |
/** |
36 |
/** |
|
|
37 |
* |
38 |
* @param suiteName name of the test suite, or {@code ANONYMOUS_SUITE} |
39 |
* in the case of anonymous suite |
40 |
* @see ResultDisplayHandler#ANONYMOUS_SUITE |
37 |
*/ |
41 |
*/ |
38 |
TestsuiteNode(final String suiteName, final boolean filtered) { |
42 |
TestsuiteNode(final String suiteName, final boolean filtered) { |
39 |
this(null, suiteName, filtered); |
43 |
this(null, suiteName, filtered); |
Lines 47-52
Link Here
|
47 |
} |
51 |
} |
48 |
|
52 |
|
49 |
/** |
53 |
/** |
|
|
54 |
* |
55 |
* @param suiteName name of the test suite, or {@code ANONYMOUS_SUITE} |
56 |
* in the case of anonymous suite |
57 |
* @see ResultDisplayHandler#ANONYMOUS_SUITE |
50 |
*/ |
58 |
*/ |
51 |
private TestsuiteNode(final Report report, |
59 |
private TestsuiteNode(final Report report, |
52 |
final String suiteName, |
60 |
final String suiteName, |
Lines 58-63
Link Here
|
58 |
this.suiteName = (report != null) ? report.suiteClassName : suiteName; |
66 |
this.suiteName = (report != null) ? report.suiteClassName : suiteName; |
59 |
this.filtered = filtered; |
67 |
this.filtered = filtered; |
60 |
|
68 |
|
|
|
69 |
assert this.suiteName != null; |
70 |
|
61 |
setDisplayName(); |
71 |
setDisplayName(); |
62 |
setIconBaseWithExtension( |
72 |
setIconBaseWithExtension( |
63 |
"org/netbeans/modules/junit/output/res/class.gif"); //NOI18N |
73 |
"org/netbeans/modules/junit/output/res/class.gif"); //NOI18N |
Lines 67-75
Link Here
|
67 |
*/ |
77 |
*/ |
68 |
void displayReport(final Report report) { |
78 |
void displayReport(final Report report) { |
69 |
assert (this.report == null) && (report != null); |
79 |
assert (this.report == null) && (report != null); |
70 |
assert report.suiteClassName.equals(this.suiteName); |
80 |
assert report.suiteClassName.equals(this.suiteName) |
|
|
81 |
|| (this.suiteName == ResultDisplayHandler.ANONYMOUS_SUITE); |
71 |
|
82 |
|
72 |
this.report = report; |
83 |
this.report = report; |
|
|
84 |
suiteName = report.suiteClassName; |
73 |
|
85 |
|
74 |
setDisplayName(); |
86 |
setDisplayName(); |
75 |
setChildren(new TestsuiteNodeChildren(report, filtered)); |
87 |
setChildren(new TestsuiteNodeChildren(report, filtered)); |
Lines 90-96
Link Here
|
90 |
private void setDisplayName() { |
102 |
private void setDisplayName() { |
91 |
String displayName; |
103 |
String displayName; |
92 |
if (report == null) { |
104 |
if (report == null) { |
93 |
if (suiteName != null) { |
105 |
if (suiteName != ResultDisplayHandler.ANONYMOUS_SUITE) { |
94 |
displayName = NbBundle.getMessage( |
106 |
displayName = NbBundle.getMessage( |
95 |
getClass(), |
107 |
getClass(), |
96 |
"MSG_TestsuiteRunning", //NOI18N |
108 |
"MSG_TestsuiteRunning", //NOI18N |
Lines 115-122
Link Here
|
115 |
/** |
127 |
/** |
116 |
*/ |
128 |
*/ |
117 |
public String getHtmlDisplayName() { |
129 |
public String getHtmlDisplayName() { |
|
|
130 |
|
131 |
assert suiteName != null; |
132 |
|
118 |
StringBuffer buf = new StringBuffer(60); |
133 |
StringBuffer buf = new StringBuffer(60); |
119 |
if (suiteName != null) { |
134 |
if (suiteName != ResultDisplayHandler.ANONYMOUS_SUITE) { |
120 |
buf.append(suiteName); |
135 |
buf.append(suiteName); |
121 |
buf.append(" "); //NOI18N |
136 |
buf.append(" "); //NOI18N |
122 |
} else { |
137 |
} else { |