diff options
| author | Eugen Wissner <belka@caraus.de> | 2025-11-21 22:26:28 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2025-11-21 22:26:28 +0100 |
| commit | 8568518b57dba05500b63a4e471f8fa65883d10a (patch) | |
| tree | 59681b400bccd6fd1299b3c22443c2ddf6f1b378 /pharo-mooc/contact-book/src/ContactBook/ContactTest.class.st | |
| parent | c03c9f8b886c0e8eca5a701c0ca941e05e0b6285 (diff) | |
| download | book-exercises-8568518b57dba05500b63a4e471f8fa65883d10a.tar.gz | |
Add pharo contact book
Diffstat (limited to 'pharo-mooc/contact-book/src/ContactBook/ContactTest.class.st')
| -rw-r--r-- | pharo-mooc/contact-book/src/ContactBook/ContactTest.class.st | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pharo-mooc/contact-book/src/ContactBook/ContactTest.class.st b/pharo-mooc/contact-book/src/ContactBook/ContactTest.class.st new file mode 100644 index 0000000..c1dc553 --- /dev/null +++ b/pharo-mooc/contact-book/src/ContactBook/ContactTest.class.st @@ -0,0 +1,27 @@ +Class { + #name : 'ContactTest', + #superclass : 'TestCase', + #category : 'ContactBook', + #package : 'ContactBook' +} + +{ #category : 'tests' } +ContactTest >> testCreation [ + + | contact | + contact := Contact + newNamed: 'Marcus Denker' + email: 'marcus.denker@inria.fr'. + self assert: contact fullname equals: 'Marcus Denker'. + self assert: contact email equals: 'marcus.denker@inria.fr' +] + +{ #category : 'tests' } +ContactTest >> testPrinting [ + + | contact | + contact := Contact + newNamed: 'Marcus Denker' + email: 'marcus.denker@inria.fr'. + self assert: contact asString equals: 'Marcus Denker <marcus.denker@inria.fr>' +] |
