aboutsummaryrefslogtreecommitdiff
path: root/pharo-mooc/contact-book/src/ContactBook/ContactTest.class.st
diff options
context:
space:
mode:
Diffstat (limited to 'pharo-mooc/contact-book/src/ContactBook/ContactTest.class.st')
-rw-r--r--pharo-mooc/contact-book/src/ContactBook/ContactTest.class.st27
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>'
+]