/
OSWindowTest.class.st
46 lines (35 loc) · 1021 Bytes
/
OSWindowTest.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
"
An OSWindowTest is a test class for testing the behavior of OSWindow
"
Class {
#name : #OSWindowTest,
#superclass : #TestCase,
#category : #'OSWindow-Tests-Tests'
}
{ #category : #tests }
OSWindowTest >> testCreatingWindow [
| window attributes |
attributes := OSWindowAttributes new.
attributes preferableDriver: OSNullWindowDriver new.
window := OSWindow createWithAttributes: attributes.
self assert: (window isValid)
]
{ #category : #tests }
OSWindowTest >> testNewWindowDefaults [
| window |
window := OSWindow newWithNullDriver.
[ self assert: window isValid.
self assert: window extent equals: OSWindowAttributes defaultExtent ]
ensure: [ window destroy ]
]
{ #category : #tests }
OSWindowTest >> testSettingUpWindow [
| window |
window := OSWindow newWithNullDriver.
[ window extent: 150@150.
self assert: window extent equals: (150@150).
self assert: (window isValid).
self assert: (window isTextInputActive not)
] ensure: [ window destroy ].
self deny: window isValid
]