10026
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
"{ Package: 'stx:libtool' }"
|
|
13 |
|
|
14 |
"{ NameSpace: Tools }"
|
|
15 |
|
|
16 |
TestCase subclass:#NavigationHistoryTests
|
|
17 |
instanceVariableNames:'history'
|
|
18 |
classVariableNames:''
|
|
19 |
poolDictionaries:''
|
11776
|
20 |
category:'Interface-Browsers-New-History'
|
10026
|
21 |
!
|
|
22 |
|
|
23 |
!NavigationHistoryTests class methodsFor:'documentation'!
|
|
24 |
|
|
25 |
copyright
|
|
26 |
"
|
|
27 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
28 |
All Rights Reserved
|
|
29 |
|
|
30 |
This software is furnished under a license and may be used
|
|
31 |
only in accordance with the terms of that license and with the
|
|
32 |
inclusion of the above copyright notice. This software may not
|
|
33 |
be provided or otherwise made available to, or used by, any
|
|
34 |
other person. No title to or ownership of the software is
|
|
35 |
hereby transferred.
|
|
36 |
"
|
|
37 |
! !
|
|
38 |
|
|
39 |
!NavigationHistoryTests methodsFor:'initialization'!
|
|
40 |
|
|
41 |
setUp
|
|
42 |
|
|
43 |
history := NavigationHistory new
|
|
44 |
|
|
45 |
"Created: / 21-02-2008 / 16:52:19 / janfrog"
|
|
46 |
! !
|
|
47 |
|
|
48 |
!NavigationHistoryTests methodsFor:'tests'!
|
|
49 |
|
|
50 |
test_01
|
|
51 |
|
|
52 |
self
|
|
53 |
assert: history canGoBack not;
|
|
54 |
assert: history canGoForward not
|
|
55 |
|
|
56 |
"Created: / 21-02-2008 / 16:54:55 / janfrog"
|
|
57 |
!
|
|
58 |
|
|
59 |
test_02
|
|
60 |
|
|
61 |
history goTo: 1.
|
|
62 |
|
|
63 |
self
|
|
64 |
assert: history canGoBack not;
|
|
65 |
assert: history canGoForward not
|
|
66 |
|
|
67 |
"Created: / 21-02-2008 / 16:55:34 / janfrog"
|
|
68 |
!
|
|
69 |
|
|
70 |
test_03
|
|
71 |
history
|
|
72 |
goTo:1;
|
|
73 |
goTo:2;
|
|
74 |
goTo:3;
|
|
75 |
goBack.
|
|
76 |
self
|
|
77 |
assert:history currentItem = 2;
|
|
78 |
assert:history canGoBack;
|
|
79 |
assert:history goBackItems asArray = #( 1 );
|
|
80 |
assert:history canGoForward;
|
|
81 |
assert:history goForwardItems asArray = #( 3 ).
|
|
82 |
|
|
83 |
"Created: / 21-02-2008 / 16:57:29 / janfrog"
|
|
84 |
"Modified: / 27-02-2008 / 11:52:26 / janfrog"
|
|
85 |
"Modified: / 06-06-2008 / 09:31:24 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
86 |
!
|
|
87 |
|
|
88 |
test_04
|
|
89 |
history
|
|
90 |
goTo:1;
|
|
91 |
goTo:2;
|
|
92 |
goTo:3;
|
|
93 |
goTo:2.
|
|
94 |
self
|
|
95 |
assert:history currentItem = 2;
|
|
96 |
assert:history canGoBack;
|
|
97 |
assert:history goBackItems asArray = #( 1 );
|
|
98 |
assert:history canGoForward;
|
|
99 |
assert:history goForwardItems asArray = #( 3 ).
|
|
100 |
|
|
101 |
"Created: / 21-02-2008 / 16:57:58 / janfrog"
|
|
102 |
"Modified: / 27-02-2008 / 11:52:26 / janfrog"
|
|
103 |
"Modified: / 06-06-2008 / 09:31:32 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
104 |
!
|
|
105 |
|
|
106 |
test_05
|
|
107 |
history
|
|
108 |
goTo:1;
|
|
109 |
goTo:2;
|
|
110 |
goTo:3;
|
|
111 |
goBack;
|
|
112 |
goBack;
|
|
113 |
goTo:5.
|
|
114 |
self
|
|
115 |
assert:history currentItem = 5;
|
|
116 |
assert:history canGoBack;
|
|
117 |
assert:history goBackItems asArray = #( 1 );
|
|
118 |
assert:history canGoForward not.
|
|
119 |
|
|
120 |
"Created: / 21-02-2008 / 16:59:11 / janfrog"
|
|
121 |
"Modified: / 27-02-2008 / 11:52:12 / janfrog"
|
|
122 |
"Modified: / 06-06-2008 / 09:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
123 |
! !
|
|
124 |
|
|
125 |
!NavigationHistoryTests class methodsFor:'documentation'!
|
|
126 |
|
|
127 |
version_CVS
|
11776
|
128 |
^ '$Header: /cvs/stx/stx/libtool/Tools__NavigationHistoryTests.st,v 1.2 2012-09-02 11:21:14 cg Exp $'
|
10026
|
129 |
!
|
|
130 |
|
|
131 |
version_SVN
|
|
132 |
^ '§Id: Tools__NavigationHistoryTests.st 7486 2009-10-26 22:06:24Z vranyj1 §'
|
|
133 |
! !
|