test/MCPatchTest.st
author Jan Vrany <jan.vrany@labware.com>
Sat, 04 Jul 2020 08:14:13 +0100
branchjv
changeset 1121 c5661215109c
parent 817 082b771e4172
permissions -rw-r--r--
Tonel: various fixes here and there (part 2)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1121
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
     1
"
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
     2
COPYRIGHT (c) 2020 LabWare
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
     3
"
28
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
"{ Package: 'stx:goodies/monticello/test' }"
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
1121
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
     6
"{ NameSpace: Smalltalk }"
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
     7
28
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
MCTestCase subclass:#MCPatchTest
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	instanceVariableNames:'patch'
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	classVariableNames:''
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
	poolDictionaries:''
817
082b771e4172 Tests moved to category SCM-Monticello-Tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 28
diff changeset
    12
	category:'SCM-Monticello-Tests'
28
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
!
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
1121
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
    15
!MCPatchTest class methodsFor:'documentation'!
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
    16
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
    17
copyright
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
    18
"
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
    19
COPYRIGHT (c) 2020 LabWare
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
    20
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
    21
"
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 817
diff changeset
    22
! !
28
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!MCPatchTest methodsFor:'as yet unclassified'!
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
setUp
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
	|rev1 rev2|
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
	rev1 _  MCSnapshotResource takeSnapshot.
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
	self change: #one toReturn: 2.
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
	rev2 _  MCSnapshotResource takeSnapshot.
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
	patch _ rev2 patchRelativeToBase: rev1.
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
	self change: #one toReturn: 1.
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
!
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
tearDown
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
	self restoreMocks
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
testPatchContents
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
	self assert: patch operations size = 1.
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
	self assert: patch operations first isModification.
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
	self assert: patch operations first definition selector = #one.
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
! !
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
!MCPatchTest class methodsFor:'documentation'!
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
version
817
082b771e4172 Tests moved to category SCM-Monticello-Tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 28
diff changeset
    48
    ^ '$Header: /cvs/stx/stx/goodies/monticello/test/MCPatchTest.st,v 1.2 2013-05-29 00:01:43 vrany Exp $'
28
2581cee089af initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
! !
817
082b771e4172 Tests moved to category SCM-Monticello-Tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 28
diff changeset
    50