diff --git a/src/Toplo-Serialization/ToElement.extension.st b/src/Toplo-Serialization/ToElement.extension.st index 0b9174a..cd6f056 100644 --- a/src/Toplo-Serialization/ToElement.extension.st +++ b/src/Toplo-Serialization/ToElement.extension.st @@ -4,7 +4,7 @@ Extension { #name : #ToElement } ToElement >> shouldSerializedChildren [ "Toplo elements should not serialize children by default. Manage exeptions in subclasses." - ^ false + ^ (self class == ToElement) ] { #category : #'*Toplo-Serialization' } diff --git a/src/Toplo-Serialization/ToSerializerTest.class.st b/src/Toplo-Serialization/ToSerializerTest.class.st index 97b183b..ed5c15f 100644 --- a/src/Toplo-Serialization/ToSerializerTest.class.st +++ b/src/Toplo-Serialization/ToSerializerTest.class.st @@ -107,14 +107,14 @@ ToSerializerTest >> testIsLeaf4 [ yourself. b1 addChild: b2. - self deny: b1 shouldSerializedChildren. + self assert: b1 shouldSerializedChildren. self assert: b1 id equals: #b1. self assert: b1 childrenCount equals: 1. element := b1 serializeThenMaterialize. - self deny: element shouldSerializedChildren. + self assert: element shouldSerializedChildren. self assert: element id equals: #b1. - self assert: element childrenCount equals: 0. + self assert: element childrenCount equals: 1. ] { #category : #tests }