A new version of Tests was added to project The Inbox:
http://source.squeak.org/inbox/Tests-ul.166.mcz ==================== Summary ==================== Name: Tests-ul.166 Author: ul Time: 14 September 2012, 4:17:35.362 pm UUID: 8dafc26e-707b-0b4c-bcc8-3d21e71fd4d6 Ancestors: Tests-ul.163 Tests for Author. =============== Diff against Tests-ul.163 =============== Item was added: + TestCase subclass: #AuthorTest + instanceVariableNames: 'originalAuthor' + classVariableNames: '' + poolDictionaries: '' + category: 'Tests-System-Support'! Item was added: + ----- Method: AuthorTest>>setUp (in category 'running') ----- + setUp + + originalAuthor := Author current shallowCopy! Item was added: + ----- Method: AuthorTest>>tearDown (in category 'running') ----- + tearDown + + Author current copyFrom: originalAuthor! Item was added: + ----- Method: AuthorTest>>testInitiallyEmpty (in category 'tests') ----- + testInitiallyEmpty + + Author reset. + self assert: Author initialsPerSe isEmpty + ! Item was added: + ----- Method: AuthorTest>>testInitials (in category 'tests') ----- + testInitials + + Author current initials: 'Smalltalk123'. + self assert: 'Smalltalk123' equals: Author initialsPerSe ! Item was added: + ----- Method: AuthorTest>>testInitialsCanContainOnlyAsciiAlphanumericCharacters (in category 'tests') ----- + testInitialsCanContainOnlyAsciiAlphanumericCharacters + + Author reset. + [ Author current requestAndSetInitials ] valueSupplyingAnswer: { + '*'. + '!!@#$Smalltalk123', (Character value: 1234) asString }. + self assert: 'Smalltalk123' equals: Author initialsPerSe + + ! Item was added: + ----- Method: AuthorTest>>testNewRaisesError (in category 'tests') ----- + testNewRaisesError + + self should: [ Author new ] raise: Error! Item was added: + ----- Method: AuthorTest>>testRequestAndSetInitials (in category 'tests') ----- + testRequestAndSetInitials + + Author reset. + [ Author current requestAndSetInitials ] valueSupplyingAnswer: { + '*'. + 'Smalltalk123' }. + self assert: 'Smalltalk123' equals: Author initialsPerSe + ! Item was added: + ----- Method: AuthorTest>>testRequestAndSetUserName (in category 'tests') ----- + testRequestAndSetUserName + + Author reset. + [ Author current requestAndSetUsername ] valueSupplyingAnswer: { + '*'. + 'Smalltalk123' }. + self assert: 'Smalltalk123' equals: Author usernamePerSe + ! Item was added: + ----- Method: AuthorTest>>testUseInitialsDuring (in category 'tests') ----- + testUseInitialsDuring + + | originalInitials | + originalInitials := Author initialsPerSe. + Author useInitials: 'other', originalInitials during: [ + self assert: 'other', originalInitials equals: Author initialsPerSe ]. + self assert: originalInitials equals: Author initialsPerSe! Item was added: + ----- Method: AuthorTest>>testUsername (in category 'tests') ----- + testUsername + + Author current username: 'Smalltalk123'. + self assert: 'Smalltalk123' equals: Author usernamePerSe ! |
Free forum by Nabble | Edit this page |