author | Claus Gittinger <cg@exept.de> |
Tue, 08 May 2018 19:58:20 +0200 | |
changeset 1043 | aeecdb5610e4 |
parent 816 | ad7b435d0718 |
child 1118 | 1cd9e0a3805b |
permissions | -rw-r--r-- |
11 | 1 |
"{ Package: 'stx:goodies/monticello/test' }" |
2 |
||
3 |
MCTestCase subclass:#MCSnapshotTest |
|
4 |
instanceVariableNames:'snapshot' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
816
ad7b435d0718
Tests moved to category SCM-Monticello-Tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
7 |
category:'SCM-Monticello-Tests' |
11 | 8 |
! |
9 |
||
10 |
||
11 |
!MCSnapshotTest methodsFor:'running'! |
|
12 |
||
13 |
setUp |
|
14 |
snapshot _ self mockSnapshot. |
|
15 |
! ! |
|
16 |
||
17 |
!MCSnapshotTest methodsFor:'tests'! |
|
18 |
||
19 |
testCreation |
|
20 |
|d| |
|
21 |
d _ self mockSnapshot definitions. |
|
22 |
self assert: (d anySatisfy: [:ea | ea isClassDefinition and: [ea className = #MCMockClassA]]). |
|
23 |
self assert: (d anySatisfy: [:ea | ea isMethodDefinition and: [ea selector = #mockClassExtension]]). |
|
24 |
self assert: (d allSatisfy: [:ea | ea isClassDefinition not or: [ea category endsWith: 'Mocks']]). |
|
25 |
||
26 |
! |
|
27 |
||
28 |
testInstanceReuse |
|
29 |
| x m n y | |
|
30 |
x _ (MCPackage new name: self mockCategoryName) snapshot. |
|
31 |
Smalltalk garbageCollect. |
|
32 |
n _ MCDefinition allSubInstances size. |
|
33 |
y _ (MCPackage new name: self mockCategoryName) snapshot. |
|
34 |
Smalltalk garbageCollect. |
|
35 |
m _ MCDefinition allSubInstances size. |
|
36 |
self assert: m = n |
|
37 |
! ! |
|
38 |
||
39 |
!MCSnapshotTest class methodsFor:'documentation'! |
|
40 |
||
41 |
version |
|
816
ad7b435d0718
Tests moved to category SCM-Monticello-Tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
42 |
^ '$Header: /cvs/stx/stx/goodies/monticello/test/MCSnapshotTest.st,v 1.2 2013-05-29 00:01:35 vrany Exp $' |
11 | 43 |
! ! |
816
ad7b435d0718
Tests moved to category SCM-Monticello-Tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
44 |