author | vranyj1 |
Tue, 26 Jul 2011 16:31:02 +0000 | |
branch | jk_new_structure |
changeset 877 | f5a5b93e1c78 |
parent 865 | 82615f7deade |
child 905 | d03d9e05c581 |
permissions | -rw-r--r-- |
877 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
3 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
|
4 |
SWING Research Group, Czech Technical University in Prague |
|
5 |
||
6 |
Parts of the code written by Claus Gittinger are under following |
|
7 |
license: |
|
8 |
||
9 |
This software is furnished under a license and may be used |
|
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
15 |
||
16 |
Parts of the code written at SWING Reasearch Group [1] are MIT licensed: |
|
17 |
||
18 |
Permission is hereby granted, free of charge, to any person |
|
19 |
obtaining a copy of this software and associated documentation |
|
20 |
files (the 'Software'), to deal in the Software without |
|
21 |
restriction, including without limitation the rights to use, |
|
22 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
23 |
copies of the Software, and to permit persons to whom the |
|
24 |
Software is furnished to do so, subject to the following |
|
25 |
conditions: |
|
26 |
||
27 |
The above copyright notice and this permission notice shall be |
|
28 |
included in all copies or substantial portions of the Software. |
|
29 |
||
30 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
31 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
32 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
33 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
34 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
35 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
36 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
37 |
OTHER DEALINGS IN THE SOFTWARE. |
|
38 |
||
39 |
[1] Code written at SWING Research Group contain a signature |
|
40 |
of one of the above copright owners. |
|
41 |
" |
|
859
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
42 |
"{ Package: 'stx:libjava' }" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
43 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
44 |
TestCase subclass:#JavaTestCaseProxy |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
45 |
instanceVariableNames:'' |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
46 |
classVariableNames:'TestCases' |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
47 |
poolDictionaries:'' |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
48 |
category:'Languages-Java-Tests-Proxies' |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
49 |
! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
50 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
51 |
JavaTestCaseProxy class instanceVariableNames:'javaClassName shouldFork' |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
52 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
53 |
" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
54 |
The following class instance variables are inherited by this class: |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
55 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
56 |
TestCase - lastTestRunResultOrNil lastTestRunsPassedTests lastTestRunsFailedTests lastTestRunsErrorTests |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
57 |
TestAsserter - |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
58 |
Object - |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
59 |
" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
60 |
! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
61 |
|
877 | 62 |
!JavaTestCaseProxy class methodsFor:'documentation'! |
63 |
||
64 |
copyright |
|
65 |
" |
|
66 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
67 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
|
68 |
SWING Research Group, Czech Technical University in Prague |
|
69 |
||
70 |
Parts of the code written by Claus Gittinger are under following |
|
71 |
license: |
|
72 |
||
73 |
This software is furnished under a license and may be used |
|
74 |
only in accordance with the terms of that license and with the |
|
75 |
inclusion of the above copyright notice. This software may not |
|
76 |
be provided or otherwise made available to, or used by, any |
|
77 |
other person. No title to or ownership of the software is |
|
78 |
hereby transferred. |
|
79 |
||
80 |
Parts of the code written at SWING Reasearch Group [1] are MIT licensed: |
|
81 |
||
82 |
Permission is hereby granted, free of charge, to any person |
|
83 |
obtaining a copy of this software and associated documentation |
|
84 |
files (the 'Software'), to deal in the Software without |
|
85 |
restriction, including without limitation the rights to use, |
|
86 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
87 |
copies of the Software, and to permit persons to whom the |
|
88 |
Software is furnished to do so, subject to the following |
|
89 |
conditions: |
|
90 |
||
91 |
The above copyright notice and this permission notice shall be |
|
92 |
included in all copies or substantial portions of the Software. |
|
93 |
||
94 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
95 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
96 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
97 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
98 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
99 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
100 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
101 |
OTHER DEALINGS IN THE SOFTWARE. |
|
102 |
||
103 |
[1] Code written at SWING Research Group contain a signature |
|
104 |
of one of the above copright owners. |
|
105 |
||
106 |
" |
|
107 |
! ! |
|
859
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
108 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
109 |
!JavaTestCaseProxy class methodsFor:'initialization'! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
110 |
|
865 | 111 |
initialize |
112 |
||
113 |
TestCases := Dictionary new. |
|
114 |
||
115 |
"Created: / 01-03-2011 / 10:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
116 |
! |
|
117 |
||
859
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
118 |
setJavaClassName: aSymbol |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
119 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
120 |
javaClassName ifNotNil: |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
121 |
[self error: 'Attempting to set java class name twice']. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
122 |
javaClassName := aSymbol. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
123 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
124 |
"Created: / 01-03-2011 / 10:43:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
125 |
! ! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
126 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
127 |
!JavaTestCaseProxy class methodsFor:'accessing'! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
128 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
129 |
javaClass |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
130 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
131 |
^Java classForName: javaClassName |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
132 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
133 |
"Created: / 01-03-2011 / 11:30:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
134 |
"Modified: / 21-06-2011 / 17:09:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
135 |
! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
136 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
137 |
javaClassName |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
138 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
139 |
^javaClassName |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
140 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
141 |
"Created: / 01-03-2011 / 11:30:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
142 |
! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
143 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
144 |
shouldFork |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
145 |
^ shouldFork ? false |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
146 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
147 |
"Modified: / 13-06-2011 / 16:34:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
148 |
! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
149 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
150 |
shouldFork:aBoolean |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
151 |
shouldFork := aBoolean. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
152 |
! ! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
153 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
154 |
!JavaTestCaseProxy class methodsFor:'private'! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
155 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
156 |
testSelectors |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
157 |
"raise an error: must be redefined in concrete subclass(es)" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
158 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
159 |
^ self subclassResponsibility |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
160 |
! ! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
161 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
162 |
!JavaTestCaseProxy class methodsFor:'queries'! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
163 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
164 |
isAbstract |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
165 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
166 |
^self == JavaTestCaseProxy or:[self superclass == JavaTestCaseProxy] |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
167 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
168 |
"Created: / 21-06-2011 / 16:56:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
169 |
! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
170 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
171 |
isTestlet |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
172 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
173 |
^false |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
174 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
175 |
"Created: / 21-06-2011 / 16:57:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
176 |
! ! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
177 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
178 |
!JavaTestCaseProxy class methodsFor:'subclass creation'! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
179 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
180 |
for: javaClass |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
181 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
182 |
self subclassResponsibility |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
183 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
184 |
"Modified: / 21-06-2011 / 17:08:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
185 |
! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
186 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
187 |
forClassNamed: name |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
188 |
"Answers a new (anonymous) testcase proxy for |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
189 |
given javaClass" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
190 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
191 |
| meta cls | |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
192 |
TestCases at: name ifPresent: [:c | ^ c ]. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
193 |
meta := Metaclass new. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
194 |
meta setSuperclass: self class. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
195 |
meta instSize: self class instSize. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
196 |
cls := meta new. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
197 |
cls setSuperclass: self. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
198 |
cls flags: self flags. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
199 |
cls instSize: self instSize. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
200 |
cls setJavaClassName: name. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
201 |
cls |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
202 |
setName: (self name , ' for: (Java classForName: ' , name storeString |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
203 |
, ')') asSymbol. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
204 |
cls setCategory: #'(java test case proxies)'. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
205 |
TestCases at: name put: cls. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
206 |
^ cls |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
207 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
208 |
"Modified: / 03-03-2011 / 00:20:49 / Marcel Hlopko <hlopik@gmail.com>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
209 |
"Modified: / 29-04-2011 / 10:21:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
210 |
"Created: / 21-06-2011 / 17:07:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
211 |
! ! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
212 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
213 |
!JavaTestCaseProxy methodsFor:'accessing'! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
214 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
215 |
javaClass |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
216 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
217 |
| javaClass | |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
218 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
219 |
self |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
220 |
assert: (javaClass := self class javaClass) isJavaClass |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
221 |
description: 'java class does not exists'. |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
222 |
^javaClass |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
223 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
224 |
"Created: / 01-03-2011 / 14:48:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
225 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
226 |
! ! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
227 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
228 |
!JavaTestCaseProxy class methodsFor:'documentation'! |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
229 |
|
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
230 |
version_SVN |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
231 |
^ '$Id$' |
56bc5e063b7d
Common code from JUnitTestCaseProxy and TestletTestCaseProxy moved to a common superclass
vranyj1
parents:
diff
changeset
|
232 |
! ! |
865 | 233 |
|
234 |
JavaTestCaseProxy initialize! |