diff --git a/src/BaselineOfBlocSerialization/BaselineOfBlocSerialization.class.st b/src/BaselineOfBlocSerialization/BaselineOfBlocSerialization.class.st index 97e0774..67d246c 100644 --- a/src/BaselineOfBlocSerialization/BaselineOfBlocSerialization.class.st +++ b/src/BaselineOfBlocSerialization/BaselineOfBlocSerialization.class.st @@ -8,25 +8,25 @@ Class { BaselineOfBlocSerialization >> baseline: spec [ - spec for: #common do: [ - - "dependencies" + spec for: #common do: [ "dependencies" spec baseline: 'Ston' with: [ spec repository: 'github://svenvc/ston/repository' ]. + spec + baseline: 'StashSerialization' + with: [ spec repository: 'github://Nyan11/Stash/src' ]. + spec baseline: 'Bloc' with: [ spec repository: 'github://pharo-graphics/Bloc:master/src' ]. "project packages" spec package: 'Bloc-Serialization-STON'. - spec - package: 'Bloc-Serialization' - with: [ spec requires: #( 'Bloc' 'Bloc-Serialization-STON' 'Ston' ) ]. + spec package: 'Bloc-Serialization' with: [ + spec requires: #( 'Bloc' 'Bloc-Serialization-STON' + 'Ston' ) ]. spec package: 'Bloc-Serialization-Tests' - with: [ spec requires: #( 'Bloc-Serialization' ) ]. - - ] + with: [ spec requires: #( 'Bloc-Serialization' ) ] ] ] diff --git a/src/Bloc-Serialization-Tests/BlElementSerializationTests.class.st b/src/Bloc-Serialization-Tests/BlElementSerializationTests.class.st index 308fb21..4aaa9d8 100644 --- a/src/Bloc-Serialization-Tests/BlElementSerializationTests.class.st +++ b/src/Bloc-Serialization-Tests/BlElementSerializationTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlElementSerializationTests, - #superclass : #TestCase, - #category : #'Bloc-Serialization-Tests-Extensions' + #name : 'BlElementSerializationTests', + #superclass : 'TestCase', + #category : 'Bloc-Serialization-Tests-Extensions', + #package : 'Bloc-Serialization-Tests', + #tag : 'Extensions' } -{ #category : #tests } +{ #category : 'tests' } BlElementSerializationTests >> testSerialize [ | string | @@ -12,7 +14,7 @@ BlElementSerializationTests >> testSerialize [ self assert: string isString ] -{ #category : #tests } +{ #category : 'tests' } BlElementSerializationTests >> testSerializeThenMaterialize [ | element newElement | @@ -22,7 +24,7 @@ BlElementSerializationTests >> testSerializeThenMaterialize [ self assert: element class equals: newElement class. ] -{ #category : #tests } +{ #category : 'tests' } BlElementSerializationTests >> testShouldSerializedChildren [ | element | diff --git a/src/Bloc-Serialization-Tests/BlSerializerTest.class.st b/src/Bloc-Serialization-Tests/BlSerializerTest.class.st index 34614ac..60fe55d 100644 --- a/src/Bloc-Serialization-Tests/BlSerializerTest.class.st +++ b/src/Bloc-Serialization-Tests/BlSerializerTest.class.st @@ -2,12 +2,14 @@ A BlSerializerTest is a test class for testing the behavior of BlSerializer " Class { - #name : #BlSerializerTest, - #superclass : #TestCase, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlSerializerTest', + #superclass : 'TestCase', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlSerializerTest >> testMaterializeEmptyString [ | error blElement | @@ -19,7 +21,7 @@ BlSerializerTest >> testMaterializeEmptyString [ self assert: (error isKindOf: BlocMaterializationError) ] -{ #category : #tests } +{ #category : 'tests' } BlSerializerTest >> testMaterializeNilString [ | blElement error | @@ -31,7 +33,7 @@ BlSerializerTest >> testMaterializeNilString [ self assert: (error isKindOf: BlocMaterializationError) ] -{ #category : #tests } +{ #category : 'tests' } BlSerializerTest >> testMaterializeNotSerializedString [ | blElement error | @@ -43,7 +45,7 @@ BlSerializerTest >> testMaterializeNotSerializedString [ self assert: (error isKindOf: BlocMaterializationError) ] -{ #category : #tests } +{ #category : 'tests' } BlSerializerTest >> testSerialize [ | string | @@ -51,7 +53,7 @@ BlSerializerTest >> testSerialize [ self assert: string isString ] -{ #category : #tests } +{ #category : 'tests' } BlSerializerTest >> testSerializeBlElementCollection [ | error result oc oc2 | @@ -59,7 +61,6 @@ BlSerializerTest >> testSerializeBlElementCollection [ error := nil. result := nil. [ result := BlSerializer serialize: OrderedCollection new ] onErrorDo: [ :e | error := e ]. self deny: (error isKindOf: BlocSerializationError). "this test is ok because of a empty string is an empty collection" - self assert: result equals: 'OrderedCollection [ ]'. error := nil. result := nil. oc := OrderedCollection new. @@ -71,7 +72,7 @@ BlSerializerTest >> testSerializeBlElementCollection [ self assert: (oc2 allSatisfy: [ :e | e class = BlElement ]). ] -{ #category : #tests } +{ #category : 'tests' } BlSerializerTest >> testSerializeNilObject [ | error blElement | @@ -83,7 +84,7 @@ BlSerializerTest >> testSerializeNilObject [ self assert: (error isKindOf: BlocSerializationError) ] -{ #category : #tests } +{ #category : 'tests' } BlSerializerTest >> testSerializeNoBlElement [ | error result | @@ -108,7 +109,7 @@ BlSerializerTest >> testSerializeNoBlElement [ self assert: (error isKindOf: BlocSerializationError). "this test is ok because of a empty string is an empty collection" ] -{ #category : #tests } +{ #category : 'tests' } BlSerializerTest >> testSerializeThenMaterialize [ | string blElement | diff --git a/src/Bloc-Serialization-Tests/BlTestShouldNotSerializedChildrenElement.class.st b/src/Bloc-Serialization-Tests/BlTestShouldNotSerializedChildrenElement.class.st index 0433c6d..79e47a0 100644 --- a/src/Bloc-Serialization-Tests/BlTestShouldNotSerializedChildrenElement.class.st +++ b/src/Bloc-Serialization-Tests/BlTestShouldNotSerializedChildrenElement.class.st @@ -2,12 +2,14 @@ This BlELement is a used for testing the no serialization of children. " Class { - #name : #BlTestShouldNotSerializedChildrenElement, - #superclass : #BlElement, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlTestShouldNotSerializedChildrenElement', + #superclass : 'BlElement', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #asserting } +{ #category : 'asserting' } BlTestShouldNotSerializedChildrenElement >> shouldSerializedChildren [ ^ false diff --git a/src/Bloc-Serialization-Tests/BlocSerializationBackgroundTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationBackgroundTests.class.st index 4c4a239..79ab139 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationBackgroundTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationBackgroundTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationBackgroundTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationBackgroundTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBackgroundTests >> testColor [ | origin | @@ -17,7 +19,7 @@ BlocSerializationBackgroundTests >> testColor [ equals: (Color red alpha: 0.8) ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBackgroundTests >> testImageBackground1 [ | origin | @@ -32,7 +34,7 @@ BlocSerializationBackgroundTests >> testImageBackground1 [ equals: PolymorphSystemSettings pharoLogoForm bits ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBackgroundTests >> testImageBackground2 [ | origin | @@ -48,7 +50,7 @@ BlocSerializationBackgroundTests >> testImageBackground2 [ self assert: element background opacity equals: 0.5 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBackgroundTests >> testLinearGradient1 [ | origin | @@ -69,7 +71,7 @@ BlocSerializationBackgroundTests >> testLinearGradient1 [ equals: 1 -> Color blue ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBackgroundTests >> testLinearGradient2 [ | origin | @@ -90,7 +92,7 @@ BlocSerializationBackgroundTests >> testLinearGradient2 [ equals: 1 -> Color blue ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBackgroundTests >> testLinearGradient3 [ | origin | @@ -112,7 +114,7 @@ BlocSerializationBackgroundTests >> testLinearGradient3 [ equals: 1 -> Color blue ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBackgroundTests >> testLinearGradient4 [ | origin | @@ -145,7 +147,7 @@ BlocSerializationBackgroundTests >> testLinearGradient4 [ equals: 1 -> Color black ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBackgroundTests >> testPaintTransparent [ | origin | @@ -157,7 +159,7 @@ BlocSerializationBackgroundTests >> testPaintTransparent [ self assert: element background isTransparent equals: true ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBackgroundTests >> testRadailGradient1 [ | origin | @@ -180,7 +182,7 @@ BlocSerializationBackgroundTests >> testRadailGradient1 [ equals: 1 -> Color blue ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBackgroundTests >> testRadialGradient2 [ | origin | diff --git a/src/Bloc-Serialization-Tests/BlocSerializationBlRopedTextTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationBlRopedTextTests.class.st index c5e820a..ec26d08 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationBlRopedTextTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationBlRopedTextTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationBlRopedTextTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationBlRopedTextTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBlRopedTextTests >> testMultiplesAttributes [ | origin | @@ -23,7 +25,7 @@ BlocSerializationBlRopedTextTests >> testMultiplesAttributes [ att class = BlTextForegroundAttribute and: [ att paint = Color red ] ]) ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBlRopedTextTests >> testNoAttributes [ | origin | @@ -34,7 +36,7 @@ BlocSerializationBlRopedTextTests >> testNoAttributes [ on: [ :element | self assert: origin text rope asString equals: 'test' ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBlRopedTextTests >> testOneAttribute [ | origin | diff --git a/src/Bloc-Serialization-Tests/BlocSerializationBorderTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationBorderTests.class.st index eb81fca..c8cc132 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationBorderTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationBorderTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationBorderTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationBorderTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorder [ | builder origin | @@ -23,7 +25,7 @@ BlocSerializationBorderTests >> testBorder [ equals: (Color red alpha: 0.8) ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderCapButt [ | builder origin | @@ -46,7 +48,7 @@ BlocSerializationBorderTests >> testBorderCapButt [ equals: BlStrokeLineButtCap ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderCapRound [ | builder origin | @@ -69,7 +71,7 @@ BlocSerializationBorderTests >> testBorderCapRound [ equals: BlStrokeLineRoundCap ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderCapSquare [ | builder origin | @@ -92,7 +94,7 @@ BlocSerializationBorderTests >> testBorderCapSquare [ equals: BlStrokeLineSquareCap ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderCustomDashArray [ | builder origin | @@ -113,7 +115,7 @@ BlocSerializationBorderTests >> testBorderCustomDashArray [ self assert: element border style dashArray equals: #( 2.6 4.2 ) ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderCustomDashOffset [ | builder origin | @@ -136,7 +138,7 @@ BlocSerializationBorderTests >> testBorderCustomDashOffset [ self assert: element border style dashOffset equals: 3.5 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderDashed [ | builder origin | @@ -158,7 +160,7 @@ BlocSerializationBorderTests >> testBorderDashed [ self assert: element border style dashOffset equals: 0 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderDashedSmall [ | builder origin | @@ -180,7 +182,7 @@ BlocSerializationBorderTests >> testBorderDashedSmall [ self assert: element border style dashOffset equals: 0 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderJoinBevel [ | builder origin | @@ -203,7 +205,7 @@ BlocSerializationBorderTests >> testBorderJoinBevel [ equals: BlStrokeLineBevelJoin ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderJoinMiter [ | builder origin | @@ -226,7 +228,7 @@ BlocSerializationBorderTests >> testBorderJoinMiter [ equals: BlStrokeLineMiterJoin ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderJoinRound [ | builder origin | @@ -250,7 +252,7 @@ BlocSerializationBorderTests >> testBorderJoinRound [ equals: BlStrokeLineRoundJoin ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationBorderTests >> testBorderSolid [ | builder origin | diff --git a/src/Bloc-Serialization-Tests/BlocSerializationChildrenTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationChildrenTests.class.st index 7f66176..a9d493d 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationChildrenTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationChildrenTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationChildrenTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationChildrenTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlocSerializationChildrenTests >> testChildren [ | origin e1 e2 e3 | @@ -32,7 +34,7 @@ BlocSerializationChildrenTests >> testChildren [ self assert: (element childAt: 3) isLastChild equals: true ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationChildrenTests >> testChildren1 [ | origin e1 e2 e3 | @@ -60,7 +62,7 @@ BlocSerializationChildrenTests >> testChildren1 [ self assert: (element childAt: 3) isLastChild equals: true ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationChildrenTests >> testChildren2 [ | origin e1 e2 e3 | @@ -97,7 +99,7 @@ BlocSerializationChildrenTests >> testChildren2 [ self assert: (element childAt: 3) constraints vertical resizer size equals: 600. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationChildrenTests >> testChildren3 [ | origin e1 e2 e3 | @@ -130,7 +132,7 @@ BlocSerializationChildrenTests >> testChildren3 [ self assert: (element childAt: 3) background paint color equals: Color yellow ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationChildrenTests >> testChildrenBasic1 [ | origin e1 e2 e3 | @@ -158,7 +160,7 @@ BlocSerializationChildrenTests >> testChildrenBasic1 [ self assert: (element childAt: 3) isLastChild equals: true ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationChildrenTests >> testChildrenBasic2 [ | origin e1 e2 e3 | @@ -189,7 +191,7 @@ BlocSerializationChildrenTests >> testChildrenBasic2 [ equals: ((element childAt: 1) childAt: 1) ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationChildrenTests >> testNoChildren [ | origin | @@ -201,7 +203,7 @@ BlocSerializationChildrenTests >> testNoChildren [ self assert: element parent equals: nil ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationChildrenTests >> testShouldNotSerializedChildrenBasic1 [ | origin e1 e2 e3 element | @@ -220,7 +222,7 @@ BlocSerializationChildrenTests >> testShouldNotSerializedChildrenBasic1 [ self assert: element children size equals: 0. ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationChildrenTests >> testShouldNotSerializedChildrenBasic2 [ | origin e1 e2 e3 element | diff --git a/src/Bloc-Serialization-Tests/BlocSerializationConstraintsTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationConstraintsTests.class.st index 4607682..b90f9c3 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationConstraintsTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationConstraintsTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationConstraintsTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationConstraintsTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testHeight [ | origin | @@ -18,7 +20,7 @@ BlocSerializationConstraintsTests >> testHeight [ self assert: element constraints maxHeight equals: 500 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testMargin1 [ | origin | @@ -33,7 +35,7 @@ BlocSerializationConstraintsTests >> testMargin1 [ self assert: element margin right equals: 10 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testMargin2 [ | origin | @@ -53,7 +55,7 @@ BlocSerializationConstraintsTests >> testMargin2 [ ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testMargin3 [ | origin | @@ -67,7 +69,7 @@ BlocSerializationConstraintsTests >> testMargin3 [ self assert: element margin right equals: 10 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testMargin4 [ | origin | @@ -86,7 +88,7 @@ BlocSerializationConstraintsTests >> testMargin4 [ self assert: element margin right equals: 4 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testPadding1 [ | origin | @@ -101,7 +103,7 @@ BlocSerializationConstraintsTests >> testPadding1 [ self assert: element padding right equals: 10 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testPadding2 [ | origin | @@ -119,7 +121,7 @@ BlocSerializationConstraintsTests >> testPadding2 [ self assert: element padding right equals: 4 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testPadding3 [ | origin | @@ -133,7 +135,7 @@ BlocSerializationConstraintsTests >> testPadding3 [ self assert: element padding right equals: 10 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testPadding4 [ | origin | @@ -152,7 +154,7 @@ BlocSerializationConstraintsTests >> testPadding4 [ self assert: element padding right equals: 4 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testPosition1 [ | origin | @@ -163,7 +165,7 @@ BlocSerializationConstraintsTests >> testPosition1 [ self assert: element constraints position equals: 100 @ 500 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testPosition2 [ | origin | @@ -175,7 +177,7 @@ BlocSerializationConstraintsTests >> testPosition2 [ self assert: element constraints position equals: 100 @ 500 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testSize [ | origin | @@ -185,7 +187,7 @@ BlocSerializationConstraintsTests >> testSize [ self assert: element constraints vertical resizer size equals: 20 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationConstraintsTests >> testWidth [ | origin | diff --git a/src/Bloc-Serialization-Tests/BlocSerializationGeometryTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationGeometryTests.class.st index fa8782d..006dc17 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationGeometryTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationGeometryTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationGeometryTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationGeometryTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testAnnulusSector [ | origin | @@ -25,7 +27,7 @@ BlocSerializationGeometryTests >> testAnnulusSector [ self assert: element geometry outerRadius equals: 0.9 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testBezierCurve [ | origin | @@ -44,7 +46,7 @@ BlocSerializationGeometryTests >> testBezierCurve [ (35 @ 40) }. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testCircle [ | origin | @@ -54,7 +56,7 @@ BlocSerializationGeometryTests >> testCircle [ self assert: (element geometry isKindOf: BlCircleGeometry) ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testEllipse [ | origin | @@ -67,7 +69,7 @@ BlocSerializationGeometryTests >> testEllipse [ ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testEmpty [ | origin | @@ -80,7 +82,7 @@ BlocSerializationGeometryTests >> testEmpty [ ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testLine [ | origin | @@ -94,7 +96,7 @@ BlocSerializationGeometryTests >> testLine [ self assert: element geometry to equals: 100 @ 10 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testPolygon [ | origin | @@ -132,7 +134,7 @@ BlocSerializationGeometryTests >> testPolygon [ ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testPolyline [ | origin | @@ -151,7 +153,7 @@ BlocSerializationGeometryTests >> testPolyline [ (48 @ 36) } ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testRectangle [ | origin | @@ -163,7 +165,7 @@ BlocSerializationGeometryTests >> testRectangle [ self assert: (element geometry isKindOf: BlRectangleGeometry) ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testRoundedRectangle1 [ | origin | @@ -179,7 +181,7 @@ BlocSerializationGeometryTests >> testRoundedRectangle1 [ self assert: element geometry cornerRadii bottomLeft equals: 5. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testRoundedRectangle2 [ | origin | @@ -202,7 +204,7 @@ BlocSerializationGeometryTests >> testRoundedRectangle2 [ self assert: element geometry cornerRadii bottomLeft equals: 4 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testSquare [ | origin | @@ -214,7 +216,7 @@ BlocSerializationGeometryTests >> testSquare [ self assert: (element geometry isKindOf: BlSquareGeometry) ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testTriangle1 [ | origin | @@ -227,7 +229,7 @@ BlocSerializationGeometryTests >> testTriangle1 [ self assert: (element geometry isTop) ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testTriangle2 [ | origin | @@ -240,7 +242,7 @@ BlocSerializationGeometryTests >> testTriangle2 [ self assert: element geometry isBottom ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testTriangle3 [ | origin | @@ -253,7 +255,7 @@ BlocSerializationGeometryTests >> testTriangle3 [ self assert: element geometry isLeft ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationGeometryTests >> testTriangle4 [ | origin | diff --git a/src/Bloc-Serialization-Tests/BlocSerializationIdentificationTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationIdentificationTests.class.st index 4eda889..f19ceff 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationIdentificationTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationIdentificationTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationIdentificationTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationIdentificationTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlocSerializationIdentificationTests >> testIdentityHash [ | element newElement | @@ -14,7 +16,7 @@ BlocSerializationIdentificationTests >> testIdentityHash [ self deny: element identityHash equals: newElement identityHash. ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationIdentificationTests >> testNamedId [ | origin | @@ -25,7 +27,7 @@ BlocSerializationIdentificationTests >> testNamedId [ on: [ :element | self assert: element id equals: #test ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationIdentificationTests >> testNamedIndexedId [ | origin | @@ -40,7 +42,7 @@ BlocSerializationIdentificationTests >> testNamedIndexedId [ ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationIdentificationTests >> testNoId1 [ | origin | @@ -52,7 +54,7 @@ BlocSerializationIdentificationTests >> testNoId1 [ ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationIdentificationTests >> testNoId2 [ | origin | diff --git a/src/Bloc-Serialization-Tests/BlocSerializationLayoutSimpleTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationLayoutSimpleTests.class.st index d42ba18..1eab446 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationLayoutSimpleTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationLayoutSimpleTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationLayoutSimpleTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationLayoutSimpleTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutSimpleTests >> parentWithChildExactSize [ | child parent | @@ -31,7 +33,7 @@ BlocSerializationLayoutSimpleTests >> parentWithChildExactSize [ ^ parent ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutSimpleTests >> testForceLayoutOfMatchParent [ | origin | @@ -47,7 +49,7 @@ BlocSerializationLayoutSimpleTests >> testForceLayoutOfMatchParent [ on: [ :element | element forceLayout.self assert: element extent equals: 800 @ 600 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutSimpleTests >> testParentWithChildExactSize [ | parent child | @@ -63,7 +65,7 @@ BlocSerializationLayoutSimpleTests >> testParentWithChildExactSize [ self assert: element extent equals: 100 @ 100 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutSimpleTests >> testParentWithChildFitContent [ | child parent | @@ -82,7 +84,7 @@ BlocSerializationLayoutSimpleTests >> testParentWithChildFitContent [ self assert: element extent equals: 0 @ 0 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutSimpleTests >> testParentWithChildMatchParent [ | child parent | diff --git a/src/Bloc-Serialization-Tests/BlocSerializationLayoutTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationLayoutTests.class.st index 8730e21..5cf6c48 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationLayoutTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationLayoutTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationLayoutTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationLayoutTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #asserting } +{ #category : 'asserting' } BlocSerializationLayoutTests >> assertExactConstraint: aPoint forElement: anElement [ self @@ -15,7 +17,7 @@ BlocSerializationLayoutTests >> assertExactConstraint: aPoint forElement: anElem equals: aPoint y ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlFrameLayoutChildrenTest1 [ | origin | @@ -29,7 +31,7 @@ BlocSerializationLayoutTests >> testBlFrameLayoutChildrenTest1 [ self assertExactConstraint: 100 @ 50 forElement: element. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlFrameLayoutChildrenTest2 [ | origin | @@ -41,7 +43,7 @@ BlocSerializationLayoutTests >> testBlFrameLayoutChildrenTest2 [ self assert: element layout class equals: BlFrameLayout ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlFrameLayoutChildrenTest3 [ | origin | @@ -59,7 +61,7 @@ BlocSerializationLayoutTests >> testBlFrameLayoutChildrenTest3 [ self assert: element border paint equals: Color red asBlPaint. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest1 [ | origin | @@ -71,7 +73,7 @@ BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest1 [ self assertExactConstraint: 140 @ 140 forElement: element ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest2 [ | origin childOne childTwo | @@ -89,7 +91,7 @@ BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest2 [ self assert: parent extent equals: 300 @ 250 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest3 [ | origin childOne childTwo | @@ -107,7 +109,7 @@ BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest3 [ self assert: parent extent equals: 300 @ 250. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest4 [ | origin childTopLeft childTopCenter childTopRight childCenterLeft childCenterCenter childCenterRight childBottomLeft childBottomCenter childBottomRight | @@ -127,7 +129,7 @@ BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest4 [ self assert: parent extent equals: 300 @ 250. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest5 [ | origin childOne childTwo | @@ -145,7 +147,7 @@ BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest5 [ self assert: parent extent equals: 300 @ 250. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest6 [ | origin childOne childTwo | @@ -163,7 +165,7 @@ BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest6 [ self assert: parent extent equals: 250 @ 250. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest7 [ | origin childOne childTwo | @@ -181,7 +183,7 @@ BlocSerializationLayoutTests >> testBlFrameLayoutMultipleChildrenTestTest7 [ self assert: parent extent equals: 300 @ 250. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest1 [ | origin childA | @@ -196,7 +198,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest1 [ self assert: parent position equals: 0 @ 0 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest10 [ | origin | @@ -207,7 +209,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest10 [ self assert: element layout isHorizontal. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest2 [ | origin childA childB | @@ -225,7 +227,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest2 [ self assert: parent position equals: 0 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest3 [ | origin childA | @@ -240,7 +242,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest3 [ self assert: parent position equals: 0 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest4 [ | origin childA childB childC | @@ -261,7 +263,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest4 [ self assert: parent position equals: 0 @ 0 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest5 [ | origin childA childB childC | @@ -282,7 +284,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest5 [ self assert: parent position equals: 0 @ 0] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest6 [ | origin childA childB | @@ -300,7 +302,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest6 [ self assert: parent position equals: 0 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest7 [ | origin childA childB | @@ -318,7 +320,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest7 [ self assert: parent position equals: 0 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest8 [ | origin childA childB | @@ -336,7 +338,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest8 [ self assert: parent position equals: 0 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest9 [ | origin aRed aBlue | @@ -362,7 +364,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutHorizontalTest9 [ self assert: aBlue extent equals: 460 @ 380. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest1 [ | origin child | @@ -375,7 +377,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest1 [ self assert: child extent equals: 100 @ 0 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest10 [ | origin childA childB childC | @@ -392,7 +394,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest10 [ self assert: childC extent equals: 75 @ 50. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest2 [ | origin child | @@ -405,7 +407,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest2 [ self assert: child extent equals: 100 @ 0 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest3 [ | origin child | @@ -418,7 +420,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest3 [ self assert: child extent equals: 100 @ 200 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest4 [ | origin child subChildren | @@ -432,7 +434,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest4 [ self assert: child extent equals: 300 @ 400. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest5 [ | origin childA childB subChildren | @@ -448,7 +450,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest5 [ self assert: childB extent equals: 100 @ 75. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest6 [ | origin childA childB subChildA subChildB | @@ -466,7 +468,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest6 [ self assert: subChildB extent equals: 100 @ 75 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest7 [ | origin childA childB childC childD | @@ -485,7 +487,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest7 [ self assert: childD extent equals: 260 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest8 [ | origin childA childB childC | @@ -502,7 +504,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest8 [ self assert: childC extent equals: 75 @ 50 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest9 [ | origin childA childB childC childD | @@ -521,7 +523,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutUsageTest9 [ self assert: childD extent equals: 260 @ 35. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest1 [ | origin childA | @@ -536,7 +538,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest1 [ self assert: parent position equals: 0 @ 0 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest2 [ | origin childA childB | @@ -553,7 +555,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest2 [ self assert: parent position equals: 0 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest3 [ | origin childA childB childC | @@ -574,7 +576,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest3 [ self assert: parent position equals: 0 @ 0 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest4 [ | origin childA childB | @@ -592,7 +594,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest4 [ self assert: parent position equals: 0 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest5 [ | origin childA | @@ -607,7 +609,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest5 [ self assert: parent position equals: 0 @ 0] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest6 [ | origin childA childB childC | @@ -628,7 +630,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest6 [ self assert: parent position equals: 0 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest7 [ | origin childA | @@ -643,7 +645,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest7 [ self assert: parent position equals: 0 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest8 [ | origin childA childB childC | @@ -664,7 +666,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest8 [ self assert: parent position equals: 0 @ 0. ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest9 [ | origin aRed aBlue | @@ -690,7 +692,7 @@ BlocSerializationLayoutTests >> testBlLinearLayoutVerticalTest9 [ self assert: aBlue extent equals: 380 @ 460 ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlOnceLayoutTest1 [ | origin aChildA aChildB aChildC | @@ -737,7 +739,7 @@ BlocSerializationLayoutTests >> testBlOnceLayoutTest1 [ ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationLayoutTests >> testBlOnceLayoutTest2 [ | origin aChildA aChildB aChildC | diff --git a/src/Bloc-Serialization-Tests/BlocSerializationOverlayTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationOverlayTests.class.st index 75d7145..e80917d 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationOverlayTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationOverlayTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationOverlayTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationOverlayTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlocSerializationOverlayTests >> testCannotSaveOverlayElementWhenAttached [ | element overlayElement newElement | diff --git a/src/Bloc-Serialization-Tests/BlocSerializationTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationTests.class.st index b25e213..4795760 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationTests.class.st @@ -1,16 +1,18 @@ Class { - #name : #BlocSerializationTests, - #superclass : #TestCase, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationTests', + #superclass : 'TestCase', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #utilities } +{ #category : 'utilities' } BlocSerializationTests >> serializeThenMaterialize: aBlElement [ ^ BlSerializer materialize: (BlSerializer serialize: aBlElement) ] -{ #category : #utilities } +{ #category : 'utilities' } BlocSerializationTests >> test: aBlElement on: aTestBloc [ "This method take a blElement, execute a Bloc with assertions inside (from test implementation) for this blElement. The blElement is serialized and rebuild, the new blElement rebuild is re-tested by the Bloc with assertions to confirm the good serialization process " diff --git a/src/Bloc-Serialization-Tests/BlocSerializationVisibilityTests.class.st b/src/Bloc-Serialization-Tests/BlocSerializationVisibilityTests.class.st index bc05e00..3416d39 100644 --- a/src/Bloc-Serialization-Tests/BlocSerializationVisibilityTests.class.st +++ b/src/Bloc-Serialization-Tests/BlocSerializationVisibilityTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #BlocSerializationVisibilityTests, - #superclass : #BlocSerializationTests, - #category : #'Bloc-Serialization-Tests-Core' + #name : 'BlocSerializationVisibilityTests', + #superclass : 'BlocSerializationTests', + #category : 'Bloc-Serialization-Tests-Core', + #package : 'Bloc-Serialization-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } BlocSerializationVisibilityTests >> testGone [ | origin | @@ -18,7 +20,7 @@ BlocSerializationVisibilityTests >> testGone [ self assert: element visibility isGone equals: true ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationVisibilityTests >> testHidden [ | origin | @@ -32,7 +34,7 @@ BlocSerializationVisibilityTests >> testHidden [ self assert: element visibility isGone equals: false ] ] -{ #category : #tests } +{ #category : 'tests' } BlocSerializationVisibilityTests >> testVisible [ | origin | diff --git a/src/Bloc-Serialization-Tests/package.st b/src/Bloc-Serialization-Tests/package.st index a93bd65..a6e029d 100644 --- a/src/Bloc-Serialization-Tests/package.st +++ b/src/Bloc-Serialization-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Bloc-Serialization-Tests' } +Package { #name : 'Bloc-Serialization-Tests' } diff --git a/src/Bloc-Serialization/Array.extension.st b/src/Bloc-Serialization/Array.extension.st new file mode 100644 index 0000000..65d2fdf --- /dev/null +++ b/src/Bloc-Serialization/Array.extension.st @@ -0,0 +1,7 @@ +Extension { #name : 'Array' } + +{ #category : '*Bloc-Serialization' } +Array >> materializeAsBlElement [ + + ^ self +] diff --git a/src/Bloc-Serialization/BlElement.extension.st b/src/Bloc-Serialization/BlElement.extension.st index f9a5923..d15bab7 100644 --- a/src/Bloc-Serialization/BlElement.extension.st +++ b/src/Bloc-Serialization/BlElement.extension.st @@ -1,18 +1,18 @@ -Extension { #name : #BlElement } +Extension { #name : 'BlElement' } -{ #category : #'*Bloc-Serialization' } +{ #category : '*Bloc-Serialization' } BlElement >> serialize [ ^ BlSerializer serialize: self ] -{ #category : #'*Bloc-Serialization' } +{ #category : '*Bloc-Serialization' } BlElement >> serializeThenMaterialize [ ^ BlSerializer materialize: (BlSerializer serialize: self) ] -{ #category : #'*Bloc-Serialization' } +{ #category : '*Bloc-Serialization' } BlElement >> shouldSerializedChildren [ ^ true diff --git a/src/Bloc-Serialization/BlSerializer.class.st b/src/Bloc-Serialization/BlSerializer.class.st index 375a12c..d976040 100644 --- a/src/Bloc-Serialization/BlSerializer.class.st +++ b/src/Bloc-Serialization/BlSerializer.class.st @@ -2,39 +2,62 @@ Serailizer class for Bloc " Class { - #name : #BlSerializer, - #superclass : #Object, - #category : #'Bloc-Serialization-Core' + #name : 'BlSerializer', + #superclass : 'Object', + #classInstVars : [ + 'serializer' + ], + #category : 'Bloc-Serialization-Core', + #package : 'Bloc-Serialization', + #tag : 'Core' } -{ #category : #serialization } +{ #category : 'serialization' } BlSerializer class >> materialize: aString [ "Materialize a String into a BlElement and return it. Default materializer is STON." - | blElement | - aString isString not ifTrue:[ BlocMaterializationError signal: 'Cannot materialize a no String object into BlElement' ]. - "Try to materialize and catch an error into a BlocMaterialization error" - [ blElement := STON fromString: aString ] onErrorDo: [ :e | BlocMaterializationError signal: 'Cannot support Bloc materialization of this String (', e asString, ')' ]. - blElement ifNil:[ BlocMaterializationError signal: 'Bloc materialization result is nil' ]. - ^ blElement + | serializerClassName serializerClass | + aString ifEmpty: [ ^ BlocMaterializationError new signal ]. + aString first = $" ifFalse: [ + ^ BlStonSerializer materialize: aString ]. + serializerClassName := aString lines first allButFirst allButLast. + serializerClass := Smalltalk environment classNamed: + serializerClassName. + ^ serializerClass materialize: ('' join: aString lines allButFirst) ] -{ #category : #serialization } +{ #category : 'initialization' } +BlSerializer class >> reset [ + +