class: MethodReference
changed: #isLocalSelector (send #implements: instead of #includesLocalSelector:)
"{ Package: 'stx:goodies/monticello' }"
MCTestCase subclass:#MCSnapshotTest
instanceVariableNames:'snapshot'
classVariableNames:''
poolDictionaries:''
category:'Monticello-Tests'
!
!MCSnapshotTest methodsFor:'*monticello-mocks'!
mockClassExtension
! !
!MCSnapshotTest methodsFor:'running'!
setUp
snapshot := self mockSnapshot.
! !
!MCSnapshotTest methodsFor:'tests'!
testCreation
|d|
d := self mockSnapshot definitions.
self assert: (d anySatisfy: [:ea | ea isClassDefinition and: [ea className = #MCMockClassA]]).
self assert: (d anySatisfy: [:ea | ea isMethodDefinition and: [ea selector = #mockClassExtension]]).
self assert: (d allSatisfy: [:ea | ea isClassDefinition not or: [ea category endsWith: 'Mocks']]).
!
testInstanceReuse
| x m n y |
x := (MCPackage new name: self mockCategoryName) snapshot.
Smalltalk garbageCollect.
n := MCDefinition allSubInstances size.
y := (MCPackage new name: self mockCategoryName) snapshot.
Smalltalk garbageCollect.
m := MCDefinition allSubInstances size.
self assert: m = n
! !
!MCSnapshotTest class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/goodies/monticello/MCSnapshotTest.st,v 1.1 2011-08-20 13:15:34 cg Exp $'
!
version_CVS
^ '$Header: /cvs/stx/stx/goodies/monticello/MCSnapshotTest.st,v 1.1 2011-08-20 13:15:34 cg Exp $'
!
version_SVN
^ '§Id: MCSnapshotTest.st 5 2010-08-29 07:30:29Z vranyj1 §'
! !