diff --git a/MonticelloTonel-Core.package/TonelWriter.class/instance/methodDefinitionOf..st b/MonticelloTonel-Core.package/TonelWriter.class/instance/methodDefinitionOf..st index 20be817..69f237a 100644 --- a/MonticelloTonel-Core.package/TonelWriter.class/instance/methodDefinitionOf..st +++ b/MonticelloTonel-Core.package/TonelWriter.class/instance/methodDefinitionOf..st @@ -3,5 +3,5 @@ methodDefinitionOf: aMethodDefinition | definition | definition := OrderedDictionary new. - self at: #category put: aMethodDefinition category in: definition. + self at: #category put: aMethodDefinition protocol in: definition. ^ self toSTON: definition \ No newline at end of file diff --git a/MonticelloTonel-Core.package/TonelWriter.class/instance/packageNameForMethodDefinition..st b/MonticelloTonel-Core.package/TonelWriter.class/instance/packageNameForMethodDefinition..st index fb4c893..bc82707 100644 --- a/MonticelloTonel-Core.package/TonelWriter.class/instance/packageNameForMethodDefinition..st +++ b/MonticelloTonel-Core.package/TonelWriter.class/instance/packageNameForMethodDefinition..st @@ -1,7 +1,7 @@ private packageNameForMethodDefinition: aMethodDefinition - | category | - self assert: aMethodDefinition category first = $*. - category := aMethodDefinition category allButFirst. - ^ (MCWorkingCopy allWorkingCopies detect: [ :wc | category sameAs: wc packageName ]) packageName \ No newline at end of file + | protocol | + self assert: aMethodDefinition protocol first = $*. + protocol := aMethodDefinition protocol allButFirst. + ^ (MCWorkingCopy allWorkingCopies detect: [ :wc | protocol sameAs: wc packageName ]) packageName \ No newline at end of file diff --git a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertClassDefinition.and..st b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertClassDefinition.and..st index b22382e..15226d5 100644 --- a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertClassDefinition.and..st +++ b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertClassDefinition.and..st @@ -1,13 +1,14 @@ tests -assertClassDefinition: a and: b - self assert: a className equals: b className. - self assert: a superclassName equals: b superclassName. - self assert: a traitCompositionString equals: b traitCompositionString. - self assert: a classTraitCompositionString equals: b classTraitCompositionString. - self assert: a category equals: b category. - self assert: a instVarNames equals: b instVarNames. - self assert: a classInstVarNames equals: b classInstVarNames. - self assert: a classVarNames equals: b classVarNames. - self assert: a poolDictionaries equals: b poolDictionaries. - self assert: a type equals: b type. - self assert: a comment equals: b comment \ No newline at end of file +assertClassDefinition: actualDefinition and: expectedDefinition + self assert: actualDefinition className equals: expectedDefinition className. + self assert: actualDefinition superclassName equals: expectedDefinition superclassName. + self assert: actualDefinition traitCompositionString equals: expectedDefinition traitCompositionString. + self assert: actualDefinition classTraitCompositionString equals: expectedDefinition classTraitCompositionString. + self assert: actualDefinition packageName equals: expectedDefinition packageName. + self assert: actualDefinition tagName equals: expectedDefinition tagName. + self assert: actualDefinition instVarNames equals: expectedDefinition instVarNames. + self assert: actualDefinition classInstVarNames equals: expectedDefinition classInstVarNames. + self assert: actualDefinition classVarNames equals: expectedDefinition classVarNames. + self assert: actualDefinition poolDictionaries equals: expectedDefinition poolDictionaries. + self assert: actualDefinition type equals: expectedDefinition type. + self assert: actualDefinition comment equals: expectedDefinition comment \ No newline at end of file diff --git a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertDefinition.and..st b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertDefinition.and..st index 5679c4f..93ef6e6 100644 --- a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertDefinition.and..st +++ b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertDefinition.and..st @@ -1,5 +1,6 @@ tests -assertDefinition: a and: b - a isOrganizationDefinition ifTrue: [ ^ self assertOrganisationDefinition: a and: b ]. - a isClassDefinition ifTrue: [ ^ self assertClassDefinition: a and: b ]. - a isMethodDefinition ifTrue: [ ^ self assertMethodDefinition: a and: b ] \ No newline at end of file +assertDefinition: actualDefinition and: expectedDefinition + + actualDefinition isOrganizationDefinition ifTrue: [ ^ self assertOrganisationDefinition: actualDefinition and: expectedDefinition ]. + actualDefinition isClassDefinition ifTrue: [ ^ self assertClassDefinition: actualDefinition and: expectedDefinition ]. + actualDefinition isMethodDefinition ifTrue: [ ^ self assertMethodDefinition: actualDefinition and: expectedDefinition ] \ No newline at end of file diff --git a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertMethodDefinition.and..st b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertMethodDefinition.and..st index 55d559b..fd43534 100644 --- a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertMethodDefinition.and..st +++ b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertMethodDefinition.and..st @@ -1,7 +1,8 @@ tests -assertMethodDefinition: a and: b - self assert: a className equals: b className. - self assert: a selector equals: b selector. - self assert: a protocol equals: b protocol. - self assert: a source asByteArray equals: b source asByteArray. - self assert: a classIsMeta equals: b classIsMeta \ No newline at end of file +assertMethodDefinition: actualDefinition and: expectedDefinition + + self assert: actualDefinition className equals: expectedDefinition className. + self assert: actualDefinition selector equals: expectedDefinition selector. + self assert: actualDefinition protocol equals: expectedDefinition protocol. + self assert: actualDefinition source asByteArray equals: expectedDefinition source asByteArray. + self assert: actualDefinition classIsMeta equals: expectedDefinition classIsMeta \ No newline at end of file diff --git a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertOrganisationDefinition.and..st b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertOrganisationDefinition.and..st index 42dd047..39bd1c4 100644 --- a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertOrganisationDefinition.and..st +++ b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/assertOrganisationDefinition.and..st @@ -1,3 +1,5 @@ tests -assertOrganisationDefinition: a and: b - self assert: a categories equals: b categories \ No newline at end of file +assertOrganisationDefinition: actualDefinition and: expectedDefinition + + self assert: actualDefinition packageName equals: expectedDefinition packageName. + self assert: actualDefinition tagNames equals: expectedDefinition tagNames \ No newline at end of file diff --git a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testHiddenFilesAreIgnored.st b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testHiddenFilesAreIgnored.st index 1f51f40..178fd46 100644 --- a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testHiddenFilesAreIgnored.st +++ b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testHiddenFilesAreIgnored.st @@ -19,4 +19,4 @@ testHiddenFilesAreIgnored reader definitions sorted with: snapshot definitions sorted - do: [ :a :b | self assertDefinition: a and: b ] ] \ No newline at end of file + do: [ :actualDefinition :expectedDefinition | self assertDefinition: actualDefinition and: expectedDefinition ] ] \ No newline at end of file diff --git a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testLoadDefinitions.st b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testLoadDefinitions.st index 8af94be..4d65dd5 100644 --- a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testLoadDefinitions.st +++ b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testLoadDefinitions.st @@ -16,4 +16,4 @@ testLoadDefinitions reader definitions sorted with: snapshot definitions sorted - do: [ :a :b | self assertDefinition: a and: b ] ] \ No newline at end of file + do: [ :actualDefinition :expectedDefinition | self assertDefinition: actualDefinition and: expectedDefinition ] ] \ No newline at end of file diff --git a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testLoadSelectorWithComments.st b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testLoadSelectorWithComments.st index 8d39394..fdfad42 100644 --- a/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testLoadSelectorWithComments.st +++ b/MonticelloTonel-Tests.package/TonelReaderTest.class/instance/testLoadSelectorWithComments.st @@ -16,4 +16,4 @@ testLoadSelectorWithComments reader definitions sorted with: snapshot definitions sorted - do: [ :a :b | self assertDefinition: a and: b ] ] \ No newline at end of file + do: [ :actualDefinition :expectedDefinition | self assertDefinition: actualDefinition and: expectedDefinition ] ] \ No newline at end of file