[squeak-dev] The Inbox: Tests-cmm.167.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Sep 14 20:18:18 UTC 2012
A new version of Tests was added to project The Inbox:
http://source.squeak.org/inbox/Tests-cmm.167.mcz
==================== Summary ====================
Name: Tests-cmm.167
Author: cmm
Time: 14 September 2012, 3:18:03.044 pm
UUID: e3dc023c-242d-4631-a1e2-7f266a2303f6
Ancestors: Tests-ul.166
Updated Author tests for alternative proposal.
=============== Diff against Tests-ul.166 ===============
Item was changed:
----- Method: AuthorTest>>setUp (in category 'running') -----
setUp
+ originalAuthor := Author current.
+ Author reset!
-
- originalAuthor := Author current shallowCopy!
Item was changed:
----- Method: AuthorTest>>tearDown (in category 'running') -----
tearDown
+ Author current: originalAuthor!
-
- Author current copyFrom: originalAuthor!
Item was changed:
----- Method: AuthorTest>>testInitiallyEmpty (in category 'tests') -----
testInitiallyEmpty
-
Author reset.
+ self assert: Author current initials isEmpty!
- self assert: Author initialsPerSe isEmpty
- !
Item was changed:
----- Method: AuthorTest>>testInitials (in category 'tests') -----
testInitials
-
Author current initials: 'Smalltalk123'.
+ self
+ assert: 'Smalltalk123'
+ equals: Author current initials!
- self assert: 'Smalltalk123' equals: Author initialsPerSe !
Item was changed:
----- Method: AuthorTest>>testInitialsCanContainOnlyAsciiAlphanumericCharacters (in category 'tests') -----
testInitialsCanContainOnlyAsciiAlphanumericCharacters
-
Author reset.
+ [ Utilities authorInitials ] valueSupplyingAnswer:
+ {'*'.
+ '!!@#$Smalltalk123' , (Character value: 1234) asString}.
+ self
+ assert: 'Smalltalk123'
+ equals: Author current initials!
- [ Author current requestAndSetInitials ] valueSupplyingAnswer: {
- '*'.
- '!!@#$Smalltalk123', (Character value: 1234) asString }.
- self assert: 'Smalltalk123' equals: Author initialsPerSe
-
- !
Item was removed:
- ----- Method: AuthorTest>>testNewRaisesError (in category 'tests') -----
- testNewRaisesError
-
- self should: [ Author new ] raise: Error!
Item was changed:
----- Method: AuthorTest>>testRequestAndSetInitials (in category 'tests') -----
testRequestAndSetInitials
-
Author reset.
+ [ Utilities authorInitials ] valueSupplyingAnswer: {'*'. 'Smalltalk123'}.
+ self
+ assert: 'Smalltalk123'
+ equals: Author current initials!
- [ Author current requestAndSetInitials ] valueSupplyingAnswer: {
- '*'.
- 'Smalltalk123' }.
- self assert: 'Smalltalk123' equals: Author initialsPerSe
- !
Item was changed:
----- Method: AuthorTest>>testRequestAndSetUserName (in category 'tests') -----
testRequestAndSetUserName
-
Author reset.
+ [ Utilities authorName ] valueSupplyingAnswer: {'*'. 'Smalltalk123'}.
+ self
+ assert: 'Smalltalk123'
+ equals: Author current username!
- [ Author current requestAndSetUsername ] valueSupplyingAnswer: {
- '*'.
- 'Smalltalk123' }.
- self assert: 'Smalltalk123' equals: Author usernamePerSe
- !
Item was changed:
----- Method: AuthorTest>>testUseInitialsDuring (in category 'tests') -----
testUseInitialsDuring
-
| originalInitials |
+ originalInitials := Author current initials.
+ Author current
+ useInitials: 'other' , originalInitials
+ during:
+ [ self
+ assert: 'other' , originalInitials
+ equals: Author current initials ].
+ self
+ assert: originalInitials
+ equals: Author current initials!
- originalInitials := Author initialsPerSe.
- Author useInitials: 'other', originalInitials during: [
- self assert: 'other', originalInitials equals: Author initialsPerSe ].
- self assert: originalInitials equals: Author initialsPerSe!
Item was changed:
----- Method: AuthorTest>>testUsername (in category 'tests') -----
testUsername
-
Author current username: 'Smalltalk123'.
+ self
+ assert: 'Smalltalk123'
+ equals: Author current username!
- self assert: 'Smalltalk123' equals: Author usernamePerSe !
More information about the Squeak-dev
mailing list
|