--- a/FileBrowserV2Tests.st Tue Oct 08 10:18:50 2002 +0200
+++ b/FileBrowserV2Tests.st Tue Oct 08 10:20:23 2002 +0200
@@ -45,6 +45,35 @@
!FileBrowserV2Tests methodsFor:'tests'!
+testDirectoryHistory
+ "Just a demonstration testCase.
+ Double click on the TestCase class or open a TestRunner to see me checking...
+ - please add more methods like this..."
+
+ |history|
+
+ history := AbstractFileBrowser directoryHistoryClass new.
+ self shouldnt: (history canBack).
+ history addToHistory:'1'.
+ self should:(history canBack).
+ self shouldnt:(history canForward).
+ history addToHistory:'2'.
+ history addToHistory:'3'.
+ self should:(history canBack).
+ self shouldnt: (history canForward).
+ self should: (history goBack = '3').
+ self should: (history goBack = '2').
+ self should: (history canForward).
+ self should: (history goForward = '3').
+ self shouldnt: (history canForward).
+
+
+
+ "
+ self run:#testDirectoryHistory
+ "
+!
+
testFileItem
"Just a demonstration testCase.
Double click on the TestCase class or open a TestRunner to see me checking...
@@ -80,37 +109,10 @@
"
self run:#testHardLink
"
-!
-
-testHistory
- "Just a demonstration testCase.
- Double click on the TestCase class or open a TestRunner to see me checking...
- - please add more methods like this..."
-
- |history item1 item2 item3|
-
- history := AbstractFileBrowser filenameHistoryClass new.
- item1 := DirectoryContentsBrowser itemClass with:(Filename homeDirectory construct:'.bashrc').
- item2 := DirectoryContentsBrowser itemClass with:(Filename homeDirectory construct:'home').
- item3 := DirectoryContentsBrowser itemClass with:(Filename homeDirectory construct:'.bashrc').
-
- self should: (item1 = item3).
- history add:item1.
- self assert: ( history size == 1 ).
- history add:item2.
- self assert: ( history size == 2 ).
- history add:item3.
- self assert: ( history size == 2 ).
-
-"/ self should: [ o at:0 ] raise:Error.
-
- "
- self run:#testHistory
- "
! !
!FileBrowserV2Tests class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/FileBrowserV2Tests.st,v 1.1 2002-09-25 07:58:41 penk Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FileBrowserV2Tests.st,v 1.2 2002-10-08 08:20:17 penk Exp $'
! !