From 13455043962014e462e4b8d9b6865187a4f5c2a7 Mon Sep 17 00:00:00 2001 From: Gabriel Cotelli Date: Fri, 27 Jan 2017 18:48:29 -0300 Subject: [PATCH] Add Holders --- .../HolderBuilderTest.class/README.md | 0 .../instance/testCombiningOnlyUnusedHolders.st | 13 +++++++++++++ .../instance/testCombiningOnlyUsedHolders.st | 11 +++++++++++ .../testCombiningUnusedAndUsedHolders.st | 15 +++++++++++++++ .../testCombiningUsedAndUnusedHolders.st | 15 +++++++++++++++ .../methodProperties.json | 9 +++++++++ .../HolderBuilderTest.class/properties.json | 11 +++++++++++ .../HolderTest.class/README.md | 0 .../instance/testExplainedByAll.st | 10 ++++++++++ .../HolderTest.class/methodProperties.json | 6 ++++++ .../HolderTest.class/properties.json | 11 +++++++++++ .../UnusedHolderTest.class/README.md | 0 .../instance/testExplainedBy.st | 10 ++++++++++ .../instance/testExplainedByAll.st | 10 ++++++++++ .../UnusedHolderTest.class/methodProperties.json | 7 +++++++ .../UnusedHolderTest.class/properties.json | 11 +++++++++++ .../monticello.meta/categories.st | 1 + .../Buoy-Tests.package/monticello.meta/version | 2 +- source/Buoy.package/Holder.class/README.md | 1 + .../Holder.class/class/containing..st | 4 ++++ .../instance/initializeContaining..st | 4 ++++ .../instance/withContentDo.ifUnused..st | 4 ++++ .../Holder.class/methodProperties.json | 9 +++++++++ source/Buoy.package/Holder.class/properties.json | 13 +++++++++++++ .../Buoy.package/HolderBehavior.class/README.md | 1 + .../instance/withContentDo..st | 4 ++++ .../instance/withContentDo.ifUnused..st | 4 ++++ .../HolderBehavior.class/methodProperties.json | 7 +++++++ .../HolderBehavior.class/properties.json | 11 +++++++++++ .../Buoy.package/HolderBuilder.class/README.md | 1 + .../class/combining.using..st | 5 +++++ .../HolderBuilder.class/instance/builtHolder.st | 6 ++++++ .../instance/initializeCombinedHolder.st | 4 ++++ .../instance/initializeCombining.using..st | 7 +++++++ .../instance/updateCombinedHolderConsidering..st | 10 ++++++++++ .../updateCombinedHolderHolding.considering..st | 4 ++++ .../updateCombinedHolderToBeExplainedBy.and..st | 7 +++++++ .../instance/updateCombinedHolderToHold..st | 4 ++++ .../updateCombinedHolderToHold.combinedWith..st | 5 +++++ ...usedCombinedHolderExplainedBy.considering..st | 9 +++++++++ .../HolderBuilder.class/methodProperties.json | 16 ++++++++++++++++ .../HolderBuilder.class/properties.json | 15 +++++++++++++++ source/Buoy.package/UnusedHolder.class/README.md | 1 + .../UnusedHolder.class/class/explainedBy..st | 4 ++++ .../UnusedHolder.class/class/explainedByAll..st | 4 ++++ .../instance/initializeExplainedBy..st | 4 ++++ .../instance/withContentDo.ifUnused..st | 4 ++++ .../UnusedHolder.class/methodProperties.json | 10 ++++++++++ .../UnusedHolder.class/properties.json | 13 +++++++++++++ .../Buoy.package/monticello.meta/categories.st | 1 + source/Buoy.package/monticello.meta/version | 2 +- 51 files changed, 338 insertions(+), 2 deletions(-) create mode 100644 source/Buoy-Tests.package/HolderBuilderTest.class/README.md create mode 100644 source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningOnlyUnusedHolders.st create mode 100644 source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningOnlyUsedHolders.st create mode 100644 source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningUnusedAndUsedHolders.st create mode 100644 source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningUsedAndUnusedHolders.st create mode 100644 source/Buoy-Tests.package/HolderBuilderTest.class/methodProperties.json create mode 100644 source/Buoy-Tests.package/HolderBuilderTest.class/properties.json create mode 100644 source/Buoy-Tests.package/HolderTest.class/README.md create mode 100644 source/Buoy-Tests.package/HolderTest.class/instance/testExplainedByAll.st create mode 100644 source/Buoy-Tests.package/HolderTest.class/methodProperties.json create mode 100644 source/Buoy-Tests.package/HolderTest.class/properties.json create mode 100644 source/Buoy-Tests.package/UnusedHolderTest.class/README.md create mode 100644 source/Buoy-Tests.package/UnusedHolderTest.class/instance/testExplainedBy.st create mode 100644 source/Buoy-Tests.package/UnusedHolderTest.class/instance/testExplainedByAll.st create mode 100644 source/Buoy-Tests.package/UnusedHolderTest.class/methodProperties.json create mode 100644 source/Buoy-Tests.package/UnusedHolderTest.class/properties.json create mode 100644 source/Buoy.package/Holder.class/README.md create mode 100644 source/Buoy.package/Holder.class/class/containing..st create mode 100644 source/Buoy.package/Holder.class/instance/initializeContaining..st create mode 100644 source/Buoy.package/Holder.class/instance/withContentDo.ifUnused..st create mode 100644 source/Buoy.package/Holder.class/methodProperties.json create mode 100644 source/Buoy.package/Holder.class/properties.json create mode 100644 source/Buoy.package/HolderBehavior.class/README.md create mode 100644 source/Buoy.package/HolderBehavior.class/instance/withContentDo..st create mode 100644 source/Buoy.package/HolderBehavior.class/instance/withContentDo.ifUnused..st create mode 100644 source/Buoy.package/HolderBehavior.class/methodProperties.json create mode 100644 source/Buoy.package/HolderBehavior.class/properties.json create mode 100644 source/Buoy.package/HolderBuilder.class/README.md create mode 100644 source/Buoy.package/HolderBuilder.class/class/combining.using..st create mode 100644 source/Buoy.package/HolderBuilder.class/instance/builtHolder.st create mode 100644 source/Buoy.package/HolderBuilder.class/instance/initializeCombinedHolder.st create mode 100644 source/Buoy.package/HolderBuilder.class/instance/initializeCombining.using..st create mode 100644 source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderConsidering..st create mode 100644 source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderHolding.considering..st create mode 100644 source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToBeExplainedBy.and..st create mode 100644 source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToHold..st create mode 100644 source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToHold.combinedWith..st create mode 100644 source/Buoy.package/HolderBuilder.class/instance/updateUnusedCombinedHolderExplainedBy.considering..st create mode 100644 source/Buoy.package/HolderBuilder.class/methodProperties.json create mode 100644 source/Buoy.package/HolderBuilder.class/properties.json create mode 100644 source/Buoy.package/UnusedHolder.class/README.md create mode 100644 source/Buoy.package/UnusedHolder.class/class/explainedBy..st create mode 100644 source/Buoy.package/UnusedHolder.class/class/explainedByAll..st create mode 100644 source/Buoy.package/UnusedHolder.class/instance/initializeExplainedBy..st create mode 100644 source/Buoy.package/UnusedHolder.class/instance/withContentDo.ifUnused..st create mode 100644 source/Buoy.package/UnusedHolder.class/methodProperties.json create mode 100644 source/Buoy.package/UnusedHolder.class/properties.json diff --git a/source/Buoy-Tests.package/HolderBuilderTest.class/README.md b/source/Buoy-Tests.package/HolderBuilderTest.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningOnlyUnusedHolders.st b/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningOnlyUnusedHolders.st new file mode 100644 index 0000000..ef2bd33 --- /dev/null +++ b/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningOnlyUnusedHolders.st @@ -0,0 +1,13 @@ +test +testCombiningOnlyUnusedHolders + + | firstHolder secondHolder builder | + + firstHolder := UnusedHolder explainedBy: 'This is expected'. + secondHolder := UnusedHolder explainedBy: 'This is expected as well'. + + builder := HolderBuilder combining: (Array with: firstHolder with: secondHolder) using: [ :combinedContents :eachContent | combinedContents min: eachContent ]. + + #('This is expected' 'This is expected as well') + with: (builder builtHolder withContentDo: [ :model | self fail ] ifUnused: [ :explanations | explanations ]) + do: [ :expected :built | self assert: expected equals: built ] \ No newline at end of file diff --git a/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningOnlyUsedHolders.st b/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningOnlyUsedHolders.st new file mode 100644 index 0000000..3dddb10 --- /dev/null +++ b/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningOnlyUsedHolders.st @@ -0,0 +1,11 @@ +test +testCombiningOnlyUsedHolders + + | firstHolder secondHolder builder | + + firstHolder := Holder containing: 11. + secondHolder := Holder containing: 30. + + builder := HolderBuilder combining: (Array with: firstHolder with: secondHolder) using: [ :combinedContents :eachContent | combinedContents min: eachContent ]. + + self assert: (builder builtHolder withContentDo: [ :model | model ] ifUnused: [ :explanations | self fail ]) equals: 11 \ No newline at end of file diff --git a/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningUnusedAndUsedHolders.st b/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningUnusedAndUsedHolders.st new file mode 100644 index 0000000..5b946a2 --- /dev/null +++ b/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningUnusedAndUsedHolders.st @@ -0,0 +1,15 @@ +test +testCombiningUnusedAndUsedHolders + + | firstHolder secondHolder builder | + + firstHolder := UnusedHolder explainedBy: 'This is not expected'. + secondHolder := Holder containing: 34. + builder := HolderBuilder + combining: (Array with: firstHolder with: secondHolder) + using: [ :combinedContents :eachContent | combinedContents min: eachContent ]. + + self + assert: + (builder builtHolder withContentDo: [ :model | model ] ifUnused: [ :explanations | self fail ]) + equals: 34 \ No newline at end of file diff --git a/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningUsedAndUnusedHolders.st b/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningUsedAndUnusedHolders.st new file mode 100644 index 0000000..85764bb --- /dev/null +++ b/source/Buoy-Tests.package/HolderBuilderTest.class/instance/testCombiningUsedAndUnusedHolders.st @@ -0,0 +1,15 @@ +test +testCombiningUsedAndUnusedHolders + + | firstHolder secondHolder builder | + + firstHolder := Holder containing: 34. + secondHolder := UnusedHolder explainedBy: 'This is not expected'. + builder := HolderBuilder + combining: (Array with: firstHolder with: secondHolder) + using: [ :combinedContents :eachContent | combinedContents min: eachContent ]. + + self + assert: + (builder builtHolder withContentDo: [ :model | model ] ifUnused: [ :explanations | self fail ]) + equals: 34 \ No newline at end of file diff --git a/source/Buoy-Tests.package/HolderBuilderTest.class/methodProperties.json b/source/Buoy-Tests.package/HolderBuilderTest.class/methodProperties.json new file mode 100644 index 0000000..29fcb7b --- /dev/null +++ b/source/Buoy-Tests.package/HolderBuilderTest.class/methodProperties.json @@ -0,0 +1,9 @@ +{ + "instance" : { + "testCombiningUnusedAndUsedHolders" : "GabrielOmarCotelli 1/5/2017 15:41", + "testCombiningUsedAndUnusedHolders" : "GabrielOmarCotelli 1/5/2017 15:42", + "testCombiningOnlyUsedHolders" : "GabrielOmarCotelli 1/5/2017 15:41", + "testCombiningOnlyUnusedHolders" : "GabrielOmarCotelli 1/5/2017 15:40" + }, + "class" : { } +} \ No newline at end of file diff --git a/source/Buoy-Tests.package/HolderBuilderTest.class/properties.json b/source/Buoy-Tests.package/HolderBuilderTest.class/properties.json new file mode 100644 index 0000000..480a28b --- /dev/null +++ b/source/Buoy-Tests.package/HolderBuilderTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Buoy-Tests-Holders", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "HolderBuilderTest", + "type" : "normal" +} \ No newline at end of file diff --git a/source/Buoy-Tests.package/HolderTest.class/README.md b/source/Buoy-Tests.package/HolderTest.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/source/Buoy-Tests.package/HolderTest.class/instance/testExplainedByAll.st b/source/Buoy-Tests.package/HolderTest.class/instance/testExplainedByAll.st new file mode 100644 index 0000000..1a45d4b --- /dev/null +++ b/source/Buoy-Tests.package/HolderTest.class/instance/testExplainedByAll.st @@ -0,0 +1,10 @@ +test +testExplainedByAll + + | holder | + + holder := Holder containing: 'The model'. + + self + assert: (holder withContentDo: [ :model | model ]) equals: 'The model'; + assert: (holder withContentDo: [ :model | model ] ifUnused: [ :explanations | self fail ]) equals: 'The model' \ No newline at end of file diff --git a/source/Buoy-Tests.package/HolderTest.class/methodProperties.json b/source/Buoy-Tests.package/HolderTest.class/methodProperties.json new file mode 100644 index 0000000..d1360a2 --- /dev/null +++ b/source/Buoy-Tests.package/HolderTest.class/methodProperties.json @@ -0,0 +1,6 @@ +{ + "instance" : { + "testExplainedByAll" : "GabrielOmarCotelli 1/5/2017 15:42" + }, + "class" : { } +} \ No newline at end of file diff --git a/source/Buoy-Tests.package/HolderTest.class/properties.json b/source/Buoy-Tests.package/HolderTest.class/properties.json new file mode 100644 index 0000000..46635e7 --- /dev/null +++ b/source/Buoy-Tests.package/HolderTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Buoy-Tests-Holders", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "HolderTest", + "type" : "normal" +} \ No newline at end of file diff --git a/source/Buoy-Tests.package/UnusedHolderTest.class/README.md b/source/Buoy-Tests.package/UnusedHolderTest.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/source/Buoy-Tests.package/UnusedHolderTest.class/instance/testExplainedBy.st b/source/Buoy-Tests.package/UnusedHolderTest.class/instance/testExplainedBy.st new file mode 100644 index 0000000..7750f43 --- /dev/null +++ b/source/Buoy-Tests.package/UnusedHolderTest.class/instance/testExplainedBy.st @@ -0,0 +1,10 @@ +test +testExplainedBy + + | holder | + + holder := UnusedHolder explainedBy: 'This is expected'. + + self + shouldnt: [ holder withContentDo: [ :model | self fail ] ] raise: Exception; + assert: (holder withContentDo: [ :model | self fail ] ifUnused: [ :explanations | explanations ]) equals: #('This is expected') \ No newline at end of file diff --git a/source/Buoy-Tests.package/UnusedHolderTest.class/instance/testExplainedByAll.st b/source/Buoy-Tests.package/UnusedHolderTest.class/instance/testExplainedByAll.st new file mode 100644 index 0000000..69c9fee --- /dev/null +++ b/source/Buoy-Tests.package/UnusedHolderTest.class/instance/testExplainedByAll.st @@ -0,0 +1,10 @@ +test +testExplainedByAll + + | holder | + + holder := UnusedHolder explainedByAll: #('This is expected' 'This as well'). + + self + shouldnt: [ holder withContentDo: [ :model | self fail ] ] raise: Exception; + assert: (holder withContentDo: [ :model | self fail ] ifUnused: [ :explanations | explanations ]) equals: #('This is expected' 'This as well') \ No newline at end of file diff --git a/source/Buoy-Tests.package/UnusedHolderTest.class/methodProperties.json b/source/Buoy-Tests.package/UnusedHolderTest.class/methodProperties.json new file mode 100644 index 0000000..9317f2b --- /dev/null +++ b/source/Buoy-Tests.package/UnusedHolderTest.class/methodProperties.json @@ -0,0 +1,7 @@ +{ + "instance" : { + "testExplainedByAll" : "GabrielOmarCotelli 1/5/2017 15:44", + "testExplainedBy" : "GabrielOmarCotelli 1/5/2017 15:43" + }, + "class" : { } +} \ No newline at end of file diff --git a/source/Buoy-Tests.package/UnusedHolderTest.class/properties.json b/source/Buoy-Tests.package/UnusedHolderTest.class/properties.json new file mode 100644 index 0000000..dc113c9 --- /dev/null +++ b/source/Buoy-Tests.package/UnusedHolderTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Buoy-Tests-Holders", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "UnusedHolderTest", + "type" : "normal" +} \ No newline at end of file diff --git a/source/Buoy-Tests.package/monticello.meta/categories.st b/source/Buoy-Tests.package/monticello.meta/categories.st index 6146567..e65a3f4 100644 --- a/source/Buoy-Tests.package/monticello.meta/categories.st +++ b/source/Buoy-Tests.package/monticello.meta/categories.st @@ -1,2 +1,3 @@ SystemOrganization addCategory: #'Buoy-Tests'! SystemOrganization addCategory: 'Buoy-Tests-Assertions'! +SystemOrganization addCategory: 'Buoy-Tests-Holders'! diff --git a/source/Buoy-Tests.package/monticello.meta/version b/source/Buoy-Tests.package/monticello.meta/version index cfbbba0..f80b2c5 100644 --- a/source/Buoy-Tests.package/monticello.meta/version +++ b/source/Buoy-Tests.package/monticello.meta/version @@ -1 +1 @@ -(name 'Buoy-Tests-GabrielOmarCotelli.2' message 'Renamed a method' id '4db25a31-cdbf-4d66-8e72-877e298b1b47' date '26 January 2017' time '7:51:46.200684 pm' author 'GabrielOmarCotelli' ancestors ((name 'Buoy-Tests-GabrielOmarCotelli.1' message 'Renamed packages' id '714b9a68-e0b3-4b48-be06-7b3f27f4ce47' date '26 January 2017' time '7:29:43.673983 pm' author 'GabrielOmarCotelli' ancestors () stepChildren ())) stepChildren ()) \ No newline at end of file +(name 'Buoy-Tests-GabrielOmarCotelli.3' message 'Add Holders ' id '21414a7c-6b1d-134d-a01a-dad169c438de' date '27 January 2017' time '6:47:13.88642 pm' author 'GabrielOmarCotelli' ancestors ((name 'Buoy-Tests-GabrielOmarCotelli.2' message 'Renamed a method' id '4db25a31-cdbf-4d66-8e72-877e298b1b47' date '26 January 2017' time '7:51:46.200684 pm' author 'GabrielOmarCotelli' ancestors ((name 'Buoy-Tests-GabrielOmarCotelli.1' message 'Renamed packages' id '714b9a68-e0b3-4b48-be06-7b3f27f4ce47' date '26 January 2017' time '7:29:43.673983 pm' author 'GabrielOmarCotelli' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/source/Buoy.package/Holder.class/README.md b/source/Buoy.package/Holder.class/README.md new file mode 100644 index 0000000..f1c745e --- /dev/null +++ b/source/Buoy.package/Holder.class/README.md @@ -0,0 +1 @@ +This is the counterpart to UnusedHolder, to identify the existance of an object occupying a certain role. \ No newline at end of file diff --git a/source/Buoy.package/Holder.class/class/containing..st b/source/Buoy.package/Holder.class/class/containing..st new file mode 100644 index 0000000..579115b --- /dev/null +++ b/source/Buoy.package/Holder.class/class/containing..st @@ -0,0 +1,4 @@ +instance creation +containing: aContent + + ^self new initializeContaining: aContent \ No newline at end of file diff --git a/source/Buoy.package/Holder.class/instance/initializeContaining..st b/source/Buoy.package/Holder.class/instance/initializeContaining..st new file mode 100644 index 0000000..35b4dd7 --- /dev/null +++ b/source/Buoy.package/Holder.class/instance/initializeContaining..st @@ -0,0 +1,4 @@ +initialize-release +initializeContaining: aContent + + content := aContent \ No newline at end of file diff --git a/source/Buoy.package/Holder.class/instance/withContentDo.ifUnused..st b/source/Buoy.package/Holder.class/instance/withContentDo.ifUnused..st new file mode 100644 index 0000000..dde4be2 --- /dev/null +++ b/source/Buoy.package/Holder.class/instance/withContentDo.ifUnused..st @@ -0,0 +1,4 @@ +accessing +withContentDo: aOneArgumentBlock ifUnused: anUnusedBlock + + ^aOneArgumentBlock value: content \ No newline at end of file diff --git a/source/Buoy.package/Holder.class/methodProperties.json b/source/Buoy.package/Holder.class/methodProperties.json new file mode 100644 index 0000000..fb348ae --- /dev/null +++ b/source/Buoy.package/Holder.class/methodProperties.json @@ -0,0 +1,9 @@ +{ + "instance" : { + "initializeContaining:" : "MaximilianoTabacman 12/7/2016 08:55", + "withContentDo:ifUnused:" : "guest 1/2/2014 21:25" + }, + "class" : { + "containing:" : "guest 1/2/2014 21:25" + } +} \ No newline at end of file diff --git a/source/Buoy.package/Holder.class/properties.json b/source/Buoy.package/Holder.class/properties.json new file mode 100644 index 0000000..b3e432b --- /dev/null +++ b/source/Buoy.package/Holder.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "MaximilianoTabacman 12/7/2016 08:53", + "super" : "HolderBehavior", + "category" : "Buoy-Holders", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "content" + ], + "name" : "Holder", + "type" : "normal" +} \ No newline at end of file diff --git a/source/Buoy.package/HolderBehavior.class/README.md b/source/Buoy.package/HolderBehavior.class/README.md new file mode 100644 index 0000000..60f22b5 --- /dev/null +++ b/source/Buoy.package/HolderBehavior.class/README.md @@ -0,0 +1 @@ +Abstract superclass for Holder implementations. \ No newline at end of file diff --git a/source/Buoy.package/HolderBehavior.class/instance/withContentDo..st b/source/Buoy.package/HolderBehavior.class/instance/withContentDo..st new file mode 100644 index 0000000..f030cce --- /dev/null +++ b/source/Buoy.package/HolderBehavior.class/instance/withContentDo..st @@ -0,0 +1,4 @@ +accessing +withContentDo: aOneArgumentBlock + + ^ self withContentDo: aOneArgumentBlock ifUnused: [ ] \ No newline at end of file diff --git a/source/Buoy.package/HolderBehavior.class/instance/withContentDo.ifUnused..st b/source/Buoy.package/HolderBehavior.class/instance/withContentDo.ifUnused..st new file mode 100644 index 0000000..fa2bb3b --- /dev/null +++ b/source/Buoy.package/HolderBehavior.class/instance/withContentDo.ifUnused..st @@ -0,0 +1,4 @@ +accessing +withContentDo: aOneArgumentBlock ifUnused: anUnusedBlock + + self subclassResponsibility \ No newline at end of file diff --git a/source/Buoy.package/HolderBehavior.class/methodProperties.json b/source/Buoy.package/HolderBehavior.class/methodProperties.json new file mode 100644 index 0000000..8ad45fa --- /dev/null +++ b/source/Buoy.package/HolderBehavior.class/methodProperties.json @@ -0,0 +1,7 @@ +{ + "instance" : { + "withContentDo:ifUnused:" : "guest 1/2/2014 21:25", + "withContentDo:" : "MaximilianoTabacman 1/9/2017 20:09" + }, + "class" : { } +} \ No newline at end of file diff --git a/source/Buoy.package/HolderBehavior.class/properties.json b/source/Buoy.package/HolderBehavior.class/properties.json new file mode 100644 index 0000000..691beaf --- /dev/null +++ b/source/Buoy.package/HolderBehavior.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "MaximilianoTabacman 12/7/2016 08:52", + "super" : "Object", + "category" : "Buoy-Holders", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "HolderBehavior", + "type" : "normal" +} \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/README.md b/source/Buoy.package/HolderBuilder.class/README.md new file mode 100644 index 0000000..f3465be --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/README.md @@ -0,0 +1 @@ +A complex object that allows combining various holders. \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/class/combining.using..st b/source/Buoy.package/HolderBuilder.class/class/combining.using..st new file mode 100644 index 0000000..47a7c53 --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/class/combining.using..st @@ -0,0 +1,5 @@ +instance creation +combining: aHolderCollection using: aContentCombinationBlock + + ^self new initializeCombining: aHolderCollection + using: aContentCombinationBlock \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/instance/builtHolder.st b/source/Buoy.package/HolderBuilder.class/instance/builtHolder.st new file mode 100644 index 0000000..8c4c12f --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/instance/builtHolder.st @@ -0,0 +1,6 @@ +accessing +builtHolder + + self initializeCombinedHolder. + holders do: [:holder | self updateCombinedHolderConsidering: holder]. + ^combinedHolder \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/instance/initializeCombinedHolder.st b/source/Buoy.package/HolderBuilder.class/instance/initializeCombinedHolder.st new file mode 100644 index 0000000..c7e1432 --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/instance/initializeCombinedHolder.st @@ -0,0 +1,4 @@ +initialize-release +initializeCombinedHolder + + combinedHolder := UnusedHolder explainedByAll: #() \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/instance/initializeCombining.using..st b/source/Buoy.package/HolderBuilder.class/instance/initializeCombining.using..st new file mode 100644 index 0000000..092604e --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/instance/initializeCombining.using..st @@ -0,0 +1,7 @@ +initialize-release +initializeCombining: aHolderCollection using: aContentCombinationBlock + + holders := aHolderCollection. + combinationBlock := aContentCombinationBlock. + + self initializeCombinedHolder \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderConsidering..st b/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderConsidering..st new file mode 100644 index 0000000..3d4febd --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderConsidering..st @@ -0,0 +1,10 @@ +processing - private +updateCombinedHolderConsidering: holder + + combinedHolder withContentDo: + [:combinedContent | + self updateCombinedHolderHolding: combinedContent considering: holder] + ifUnused: + [:combinedExplanations | + self updateUnusedCombinedHolderExplainedBy: combinedExplanations + considering: holder] \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderHolding.considering..st b/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderHolding.considering..st new file mode 100644 index 0000000..3b35b01 --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderHolding.considering..st @@ -0,0 +1,4 @@ +processing - private +updateCombinedHolderHolding: combinedContent considering: holder + + holder withContentDo: [ :content | self updateCombinedHolderToHold: content combinedWith: combinedContent ] ifUnused: [ "Una vez que tengo algĂșn contenido, no me interesan los unused recibidos" ] \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToBeExplainedBy.and..st b/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToBeExplainedBy.and..st new file mode 100644 index 0000000..a47825a --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToBeExplainedBy.and..st @@ -0,0 +1,7 @@ +processing - private +updateCombinedHolderToBeExplainedBy: explanations and: combinedExplanations + + combinedHolder := UnusedHolder explainedByAll: ((OrderedCollection new) + addAll: combinedExplanations; + addAll: explanations; + yourself) \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToHold..st b/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToHold..st new file mode 100644 index 0000000..1991ca6 --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToHold..st @@ -0,0 +1,4 @@ +processing - private +updateCombinedHolderToHold: content + + combinedHolder := Holder containing: content \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToHold.combinedWith..st b/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToHold.combinedWith..st new file mode 100644 index 0000000..4635d1d --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/instance/updateCombinedHolderToHold.combinedWith..st @@ -0,0 +1,5 @@ +processing - private +updateCombinedHolderToHold: content combinedWith: combinedContent + + combinedHolder := Holder + containing: (combinationBlock value: combinedContent value: content) \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/instance/updateUnusedCombinedHolderExplainedBy.considering..st b/source/Buoy.package/HolderBuilder.class/instance/updateUnusedCombinedHolderExplainedBy.considering..st new file mode 100644 index 0000000..7e20595 --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/instance/updateUnusedCombinedHolderExplainedBy.considering..st @@ -0,0 +1,9 @@ +processing - private +updateUnusedCombinedHolderExplainedBy: combinedExplanations considering: holder + + holder + withContentDo: [:content | self updateCombinedHolderToHold: content] + ifUnused: + [:explanations | + self updateCombinedHolderToBeExplainedBy: explanations + and: combinedExplanations] \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/methodProperties.json b/source/Buoy.package/HolderBuilder.class/methodProperties.json new file mode 100644 index 0000000..88aed0d --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/methodProperties.json @@ -0,0 +1,16 @@ +{ + "instance" : { + "updateCombinedHolderToHold:combinedWith:" : "guest 1/2/2014 21:25", + "updateCombinedHolderHolding:considering:" : "MaximilianoTabacman 1/9/2017 20:09", + "updateCombinedHolderToBeExplainedBy:and:" : "guest 1/2/2014 21:25", + "initializeCombining:using:" : "guest 1/2/2014 21:25", + "updateCombinedHolderToHold:" : "guest 1/2/2014 21:25", + "initializeCombinedHolder" : "guest 1/2/2014 21:25", + "updateCombinedHolderConsidering:" : "guest 1/2/2014 21:25", + "updateUnusedCombinedHolderExplainedBy:considering:" : "guest 1/2/2014 21:25", + "builtHolder" : "guest 1/2/2014 21:25" + }, + "class" : { + "combining:using:" : "guest 1/2/2014 21:25" + } +} \ No newline at end of file diff --git a/source/Buoy.package/HolderBuilder.class/properties.json b/source/Buoy.package/HolderBuilder.class/properties.json new file mode 100644 index 0000000..282048e --- /dev/null +++ b/source/Buoy.package/HolderBuilder.class/properties.json @@ -0,0 +1,15 @@ +{ + "commentStamp" : "MaximilianoTabacman 12/7/2016 08:53", + "super" : "Object", + "category" : "Buoy-Holders", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "holders", + "combinationBlock", + "combinedHolder" + ], + "name" : "HolderBuilder", + "type" : "normal" +} \ No newline at end of file diff --git a/source/Buoy.package/UnusedHolder.class/README.md b/source/Buoy.package/UnusedHolder.class/README.md new file mode 100644 index 0000000..457fceb --- /dev/null +++ b/source/Buoy.package/UnusedHolder.class/README.md @@ -0,0 +1 @@ +This is a sort of generic null object, to identify something that is not there. \ No newline at end of file diff --git a/source/Buoy.package/UnusedHolder.class/class/explainedBy..st b/source/Buoy.package/UnusedHolder.class/class/explainedBy..st new file mode 100644 index 0000000..133ace6 --- /dev/null +++ b/source/Buoy.package/UnusedHolder.class/class/explainedBy..st @@ -0,0 +1,4 @@ +instance creation +explainedBy: anExplanation + + ^self explainedByAll: (Array with: anExplanation) \ No newline at end of file diff --git a/source/Buoy.package/UnusedHolder.class/class/explainedByAll..st b/source/Buoy.package/UnusedHolder.class/class/explainedByAll..st new file mode 100644 index 0000000..0869c01 --- /dev/null +++ b/source/Buoy.package/UnusedHolder.class/class/explainedByAll..st @@ -0,0 +1,4 @@ +instance creation +explainedByAll: anExplanationCollection + + ^self new initializeExplainedBy: anExplanationCollection \ No newline at end of file diff --git a/source/Buoy.package/UnusedHolder.class/instance/initializeExplainedBy..st b/source/Buoy.package/UnusedHolder.class/instance/initializeExplainedBy..st new file mode 100644 index 0000000..fe8d4f7 --- /dev/null +++ b/source/Buoy.package/UnusedHolder.class/instance/initializeExplainedBy..st @@ -0,0 +1,4 @@ +initialize-release +initializeExplainedBy: anExplanationCollection + + explanations := anExplanationCollection \ No newline at end of file diff --git a/source/Buoy.package/UnusedHolder.class/instance/withContentDo.ifUnused..st b/source/Buoy.package/UnusedHolder.class/instance/withContentDo.ifUnused..st new file mode 100644 index 0000000..d8e3b29 --- /dev/null +++ b/source/Buoy.package/UnusedHolder.class/instance/withContentDo.ifUnused..st @@ -0,0 +1,4 @@ +accessing +withContentDo: aOneArgumentBlock ifUnused: anUnusedBlock + + ^anUnusedBlock cull: explanations \ No newline at end of file diff --git a/source/Buoy.package/UnusedHolder.class/methodProperties.json b/source/Buoy.package/UnusedHolder.class/methodProperties.json new file mode 100644 index 0000000..3a2178e --- /dev/null +++ b/source/Buoy.package/UnusedHolder.class/methodProperties.json @@ -0,0 +1,10 @@ +{ + "instance" : { + "initializeExplainedBy:" : "MaximilianoTabacman 12/7/2016 08:55", + "withContentDo:ifUnused:" : "MaximilianoTabacman 1/9/2017 20:07" + }, + "class" : { + "explainedByAll:" : "guest 1/2/2014 21:25", + "explainedBy:" : "guest 1/2/2014 21:25" + } +} \ No newline at end of file diff --git a/source/Buoy.package/UnusedHolder.class/properties.json b/source/Buoy.package/UnusedHolder.class/properties.json new file mode 100644 index 0000000..516e8b6 --- /dev/null +++ b/source/Buoy.package/UnusedHolder.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "MaximilianoTabacman 12/7/2016 08:53", + "super" : "HolderBehavior", + "category" : "Buoy-Holders", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "explanations" + ], + "name" : "UnusedHolder", + "type" : "normal" +} \ No newline at end of file diff --git a/source/Buoy.package/monticello.meta/categories.st b/source/Buoy.package/monticello.meta/categories.st index 2f7f1cd..d7b333a 100644 --- a/source/Buoy.package/monticello.meta/categories.st +++ b/source/Buoy.package/monticello.meta/categories.st @@ -1,2 +1,3 @@ SystemOrganization addCategory: #Buoy! SystemOrganization addCategory: 'Buoy-Assertions'! +SystemOrganization addCategory: 'Buoy-Holders'! diff --git a/source/Buoy.package/monticello.meta/version b/source/Buoy.package/monticello.meta/version index fea227b..ed516ae 100644 --- a/source/Buoy.package/monticello.meta/version +++ b/source/Buoy.package/monticello.meta/version @@ -1 +1 @@ -(name 'Buoy-GabrielOmarCotelli.2' message 'Renamed a method' id '9695bddd-07f6-4941-9102-6391e123ed81' date '26 January 2017' time '7:51:52.401108 pm' author 'GabrielOmarCotelli' ancestors ((name 'Buoy-GabrielOmarCotelli.1' message 'Renamed packages' id 'cd4412b9-c2d6-4833-aa07-73bfa4f0bd14' date '26 January 2017' time '7:29:12.845086 pm' author 'GabrielOmarCotelli' ancestors () stepChildren ())) stepChildren ()) \ No newline at end of file +(name 'Buoy-GabrielOmarCotelli.3' message 'Add Holders ' id '6abb119b-9bdf-9f4d-9ed6-03e57b808e6f' date '27 January 2017' time '6:46:17.43442 pm' author 'GabrielOmarCotelli' ancestors ((name 'Buoy-GabrielOmarCotelli.2' message 'Renamed a method' id '9695bddd-07f6-4941-9102-6391e123ed81' date '26 January 2017' time '7:51:52.401108 pm' author 'GabrielOmarCotelli' ancestors ((name 'Buoy-GabrielOmarCotelli.1' message 'Renamed packages' id 'cd4412b9-c2d6-4833-aa07-73bfa4f0bd14' date '26 January 2017' time '7:29:12.845086 pm' author 'GabrielOmarCotelli' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file