MFTWeights are now immutable.

Commit
e0a2c430e89516c830eedcb50ddfba0a5cf48305
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
src/MyFitnessTracker-Tests/MFTWeightTest.class.st
index e67112e4..b61670bc 100644..100644
@@ -10,18 +10,20 @@
10 10 MFTWeightTest >> testWeightIsCreatedCorrectlyBirthday [
11 11
12 12 | weight |
13 Removed: weight := MFTWeight date: (Date fromString: '06/14/1996').
14 Removed: weight value: 90.5.
15 Removed: self assert: weight date equals: (Date fromString: '06/14/1996').
16 Removed: self assert: weight value equals: 90.5
13 Added: weight := MFTWeight
14 Added: kilograms: 90.5
15 Added: date: (Date readFrom: '14/06/1996' pattern: 'dd/mm/yyyy').
16 Added: self
17 Added: assert: weight date
18 Added: equals: (Date readFrom: '14/06/1996' pattern: 'dd/mm/yyyy').
19 Added: self assert: weight kilograms equals: 90.5
17 20 ]
18 21
19 22 { #category : 'tests' }
20 23 MFTWeightTest >> testWeightIsCreatedCorrectlyToday [
21 24
22 25 | weight |
23 Removed: weight := MFTWeight new.
24 Removed: weight value: 90.0.
26 Added: weight := MFTWeight kilograms: 90.0 date: Date today.
25 27 self assert: weight date equals: Date today.
26 Removed: self assert: weight value equals: 90.0
28 Added: self assert: weight kilograms equals: 90.0
27 29 ]