-
-
Notifications
You must be signed in to change notification settings - Fork 353
/
CmCommandDecoratorTest.class.st
56 lines (47 loc) · 1.46 KB
/
CmCommandDecoratorTest.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"
A LtCommandDecoratorTest is a test class for testing the behavior of LtCommandDecorator
"
Class {
#name : #CmCommandDecoratorTest,
#superclass : #TestCase,
#instVars : [
'commandToBeDecorated',
'decorator'
],
#category : #'Commander2-Tests'
}
{ #category : #running }
CmCommandDecoratorTest >> setUp [
super setUp.
commandToBeDecorated := CmCommand new.
commandToBeDecorated
basicName: 'command for test';
basicDescription: 'This command is only cerated for the purpose of unit tests.';
context: Object new.
decorator := CmCommandDecorator decorate: commandToBeDecorated
]
{ #category : #test }
CmCommandDecoratorTest >> testBasicName [
self assert: decorator basicName equals: commandToBeDecorated basicName
]
{ #category : #test }
CmCommandDecoratorTest >> testContext [
self assert: decorator context equals: commandToBeDecorated context
]
{ #category : #tests }
CmCommandDecoratorTest >> testDecorate [
self assert: decorator class equals: CmCommandDecorator.
self assert: decorator decoratedCommand equals: commandToBeDecorated
]
{ #category : #test }
CmCommandDecoratorTest >> testDecoratedCommand [
self assert: decorator decoratedCommand equals: commandToBeDecorated
]
{ #category : #test }
CmCommandDecoratorTest >> testDescription [
self assert: decorator basicDescription equals: commandToBeDecorated basicDescription
]
{ #category : #test }
CmCommandDecoratorTest >> testName [
self assert: decorator name equals: commandToBeDecorated name
]