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