diff --git a/src/Glorp-Unit-Tests/GlorpAddress.class.st b/src/Glorp-Unit-Tests/GlorpAddress.class.st index 3c5b0bfd..337f4dd0 100644 --- a/src/Glorp-Unit-Tests/GlorpAddress.class.st +++ b/src/Glorp-Unit-Tests/GlorpAddress.class.st @@ -9,7 +9,7 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #examples } GlorpAddress class >> example1 [ ^self new @@ -18,7 +18,7 @@ GlorpAddress class >> example1 [ number: '2042'. ] -{ #category : #'as yet unclassified' } +{ #category : #examples } GlorpAddress class >> example1WithChangedAddress [ ^self new @@ -27,24 +27,24 @@ GlorpAddress class >> example1WithChangedAddress [ number: '99999'. ] -{ #category : #'as yet unclassified' } +{ #category : #examples } GlorpAddress class >> example2 [ ^self new id: 2; street: 'Nowhere'; - number: '1000'. + number: '1000' ] -{ #category : #'as yet unclassified' } -GlorpAddress class >> glorpSetupClassModel: aClassModel forSystem: aDescriptorSystem [ +{ #category : #setup } +GlorpAddress class >> glorpSetupClassModel: aClassModel forSystem: aDescriptorSystem [ aClassModel newAttributeNamed: #id. aClassModel newAttributeNamed: #street. - aClassModel newAttributeNamed: #number. + aClassModel newAttributeNamed: #number ] -{ #category : #'as yet unclassified' } -GlorpAddress class >> glorpSetupDescriptor: aDescriptor forSystem: aDescriptorSystem [ +{ #category : #setup } +GlorpAddress class >> glorpSetupDescriptor: aDescriptor forSystem: aDescriptorSystem [ | table | table := aDescriptorSystem tableNamed: 'GR_ADDRESS'. aDescriptor table: table. diff --git a/src/Glorp-Unit-Tests/GlorpAirline.class.st b/src/Glorp-Unit-Tests/GlorpAirline.class.st index 37b62ae0..1073f022 100644 --- a/src/Glorp-Unit-Tests/GlorpAirline.class.st +++ b/src/Glorp-Unit-Tests/GlorpAirline.class.st @@ -8,18 +8,19 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #examples } GlorpAirline class >> example1 [ ^self new id: 73; - name: 'Air Canada'. + name: 'Air Canada' ] -{ #category : #'as yet unclassified' } +{ #category : #examples } GlorpAirline class >> example2 [ - ^self new - id: 74; - name: 'Lufthansa'. + + ^ self new + id: 74; + name: 'Lufthansa' ] { #category : #accessing } diff --git a/src/Glorp-Unit-Tests/GlorpAttachment.class.st b/src/Glorp-Unit-Tests/GlorpAttachment.class.st index 38ce79f5..929f34f6 100644 --- a/src/Glorp-Unit-Tests/GlorpAttachment.class.st +++ b/src/Glorp-Unit-Tests/GlorpAttachment.class.st @@ -9,16 +9,18 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } -GlorpAttachment class >> glorpSetupClassModel: model forSystem: system [ +{ #category : #setup } +GlorpAttachment class >> glorpSetupClassModel: model forSystem: system [ + model newAttributeNamed: #index; newAttributeNamed: #mimeType; newAttributeNamed: #attachmentBytes type: GlorpAttachmentBytes ] -{ #category : #'as yet unclassified' } -GlorpAttachment class >> glorpSetupDescriptor: aDesc forSystem: system [ +{ #category : #setup } +GlorpAttachment class >> glorpSetupDescriptor: aDesc forSystem: system [ + | t | t := system tableNamed: 'attachment'. aDesc table: t. diff --git a/src/Glorp-Unit-Tests/GlorpAttachmentBytes.class.st b/src/Glorp-Unit-Tests/GlorpAttachmentBytes.class.st index 0ef47fe8..15f1b36b 100644 --- a/src/Glorp-Unit-Tests/GlorpAttachmentBytes.class.st +++ b/src/Glorp-Unit-Tests/GlorpAttachmentBytes.class.st @@ -7,17 +7,19 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } -GlorpAttachmentBytes class >> glorpSetupClassModel: model forSystem: system [ +{ #category : #setup } +GlorpAttachmentBytes class >> glorpSetupClassModel: model forSystem: system [ model newAttributeNamed: #content ] -{ #category : #'as yet unclassified' } -GlorpAttachmentBytes class >> glorpSetupDescriptor: aDesc forSystem: system [ +{ #category : #setup } +GlorpAttachmentBytes class >> glorpSetupDescriptor: aDesc forSystem: system [ + | t | t := system tableNamed: 'attachmentbytes'. aDesc table: t. - (aDesc newMapping: DirectMapping) from: #content + (aDesc newMapping: DirectMapping) + from: #content to: (t fieldNamed: 'content') ] diff --git a/src/Glorp-Unit-Tests/GlorpBankAccount.class.st b/src/Glorp-Unit-Tests/GlorpBankAccount.class.st index 0817a44b..c89c1c95 100644 --- a/src/Glorp-Unit-Tests/GlorpBankAccount.class.st +++ b/src/Glorp-Unit-Tests/GlorpBankAccount.class.st @@ -10,7 +10,7 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #examples } GlorpBankAccount class >> example1 [ ^self new diff --git a/src/Glorp-Unit-Tests/GlorpBasicTax.class.st b/src/Glorp-Unit-Tests/GlorpBasicTax.class.st index cda2d312..7007b80a 100644 --- a/src/Glorp-Unit-Tests/GlorpBasicTax.class.st +++ b/src/Glorp-Unit-Tests/GlorpBasicTax.class.st @@ -4,7 +4,7 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #accessing } +{ #category : #setup } GlorpBasicTax class >> glorpSetupDescriptor: aDescriptor forSystem: aSystem [ | table | table := aSystem tableNamed: 'TAX'. diff --git a/src/Glorp-Unit-Tests/GlorpDemoDescriptorSystem.class.st b/src/Glorp-Unit-Tests/GlorpDemoDescriptorSystem.class.st index 16bf1d9e..cf211a93 100644 --- a/src/Glorp-Unit-Tests/GlorpDemoDescriptorSystem.class.st +++ b/src/Glorp-Unit-Tests/GlorpDemoDescriptorSystem.class.st @@ -7,10 +7,10 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #'accessing - defaults' } GlorpDemoDescriptorSystem class >> default [ - Default isNil ifTrue: [Default := self new]. - ^Default + + ^ Default ifNil: [ Default := self new ] ] { #category : #other } diff --git a/src/Glorp-Unit-Tests/GlorpDocumentDescriptorSystem.class.st b/src/Glorp-Unit-Tests/GlorpDocumentDescriptorSystem.class.st index 0119757e..149410c0 100644 --- a/src/Glorp-Unit-Tests/GlorpDocumentDescriptorSystem.class.st +++ b/src/Glorp-Unit-Tests/GlorpDocumentDescriptorSystem.class.st @@ -7,7 +7,7 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #utilities } GlorpDocumentDescriptorSystem class >> doTest [ " AADescriptor doTest " @@ -34,7 +34,7 @@ GlorpDocumentDescriptorSystem class >> doTest [ glorpSession accessor logout ] -{ #category : #'as yet unclassified' } +{ #category : #utilities } GlorpDocumentDescriptorSystem class >> readDocumentAndAttachmentsFrom: glorpSession [ | doc | doc := glorpSession readOneOf: GlorpDocument. diff --git a/src/Glorp-Unit-Tests/GlorpMediaType.class.st b/src/Glorp-Unit-Tests/GlorpMediaType.class.st index e27bcfa9..a53bec90 100644 --- a/src/Glorp-Unit-Tests/GlorpMediaType.class.st +++ b/src/Glorp-Unit-Tests/GlorpMediaType.class.st @@ -8,9 +8,13 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #accessing } GlorpMediaType class >> text [ - ^self new name: 'text'; mimeType: 'text/plain' + + ^ self new + name: 'text'; + mimeType: 'text/plain'; + yourself ] { #category : #accessing } diff --git a/src/Glorp-Unit-Tests/GlorpReservation.class.st b/src/Glorp-Unit-Tests/GlorpReservation.class.st index 992b737f..140d3c7b 100644 --- a/src/Glorp-Unit-Tests/GlorpReservation.class.st +++ b/src/Glorp-Unit-Tests/GlorpReservation.class.st @@ -9,7 +9,7 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #examples } GlorpReservation class >> example1 [ ^self new @@ -17,12 +17,12 @@ GlorpReservation class >> example1 [ passenger: GlorpPassenger example1. ] -{ #category : #'as yet unclassified' } +{ #category : #examples } GlorpReservation class >> example2 [ ^self new id: 7; - passenger: GlorpPassenger example2. + passenger: GlorpPassenger example2 ] { #category : #accessing } diff --git a/src/Glorp-Unit-Tests/GlorpSQLPrintingTest.class.st b/src/Glorp-Unit-Tests/GlorpSQLPrintingTest.class.st index 5b67bf45..c8aa82e8 100644 --- a/src/Glorp-Unit-Tests/GlorpSQLPrintingTest.class.st +++ b/src/Glorp-Unit-Tests/GlorpSQLPrintingTest.class.st @@ -48,5 +48,5 @@ GlorpSQLPrintingTest >> testGroupWriting [ self assertGroupWritingOnPlatform: platform. platform := SQLServerPlatform new. platform useBinding: true. - self assertGroupWritingOnPlatform: platform. + self assertGroupWritingOnPlatform: platform ] diff --git a/src/Glorp-Unit-Tests/GlorpServiceCharge.class.st b/src/Glorp-Unit-Tests/GlorpServiceCharge.class.st index d23d4f34..1dea68b9 100644 --- a/src/Glorp-Unit-Tests/GlorpServiceCharge.class.st +++ b/src/Glorp-Unit-Tests/GlorpServiceCharge.class.st @@ -8,12 +8,12 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #accessing } GlorpServiceCharge class >> default [ - ^self new - amount: (GlorpMoney forAmount: 3); - description: 'additional overcharge'. + ^ self new + amount: (GlorpMoney forAmount: 3); + description: 'additional overcharge' ] { #category : #accessing } diff --git a/src/Glorp-Unit-Tests/GlorpSurcharge.class.st b/src/Glorp-Unit-Tests/GlorpSurcharge.class.st index e5460174..34f364ce 100644 --- a/src/Glorp-Unit-Tests/GlorpSurcharge.class.st +++ b/src/Glorp-Unit-Tests/GlorpSurcharge.class.st @@ -4,7 +4,7 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #accessing } GlorpSurcharge class >> glorpSetupDescriptor: aDescriptor forSystem: aSystem [ | table | table := aSystem tableNamed: 'TAX'. @@ -12,5 +12,5 @@ GlorpSurcharge class >> glorpSetupDescriptor: aDescriptor forSystem: aSystem [ (aSystem typeResolverFor: GlorpTax) register: aDescriptor keyedBy: 'S' - field: (table fieldNamed: 'TYPE'). + field: (table fieldNamed: 'TYPE') ] diff --git a/src/Glorp-Unit-Tests/GlorpTestCase.class.st b/src/Glorp-Unit-Tests/GlorpTestCase.class.st index 13ce64df..c1a099cb 100644 --- a/src/Glorp-Unit-Tests/GlorpTestCase.class.st +++ b/src/Glorp-Unit-Tests/GlorpTestCase.class.st @@ -4,7 +4,7 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #testing } GlorpTestCase class >> isAbstract [ ^self sunitName = #GlorpTestCase ] diff --git a/src/Glorp-Unit-Tests/GlorpWorkerTask.class.st b/src/Glorp-Unit-Tests/GlorpWorkerTask.class.st index 52d723f7..c1aeb029 100644 --- a/src/Glorp-Unit-Tests/GlorpWorkerTask.class.st +++ b/src/Glorp-Unit-Tests/GlorpWorkerTask.class.st @@ -8,7 +8,7 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #examples } GlorpWorkerTask class >> exampleTaskKeys [ | keys | keys := OrderedCollection new. @@ -20,7 +20,7 @@ GlorpWorkerTask class >> exampleTaskKeys [ ^keys ] -{ #category : #'as yet unclassified' } +{ #category : #examples } GlorpWorkerTask class >> exampleTasks [ | tasks | tasks := OrderedCollection new. diff --git a/src/Glorp-Unit-Tests/TESTDescriptorSystem.class.st b/src/Glorp-Unit-Tests/TESTDescriptorSystem.class.st index e53312b6..6e2cc49e 100644 --- a/src/Glorp-Unit-Tests/TESTDescriptorSystem.class.st +++ b/src/Glorp-Unit-Tests/TESTDescriptorSystem.class.st @@ -4,7 +4,7 @@ Class { #category : #'Glorp-Unit-Tests-Models' } -{ #category : #'as yet unclassified' } +{ #category : #'accessing - queries' } TESTDescriptorSystem class >> queryForCustomerStation [ | query | query := Query read: CustomerStation @@ -13,7 +13,7 @@ TESTDescriptorSystem class >> queryForCustomerStation [ ^query ] -{ #category : #'as yet unclassified' } +{ #category : #'accessing - queries' } TESTDescriptorSystem class >> queryForFeederStation [ | query | query := Query read: FeederStation where: [:feederStation | feederStation id in: #(1 2 3 4)]. @@ -21,7 +21,7 @@ TESTDescriptorSystem class >> queryForFeederStation [ ^query ] -{ #category : #'as yet unclassified' } +{ #category : #'accessing - queries' } TESTDescriptorSystem class >> queryForSuccessor [ | query | query := Query read: Successor where: [:successor | successor successorFeeder in: self queryForFeederStation]. @@ -29,48 +29,6 @@ TESTDescriptorSystem class >> queryForSuccessor [ ^query ] -{ #category : #'as yet unclassified' } -TESTDescriptorSystem class >> testInnerQueries [ - "self testInnerQueries" - - | session system query result | - session := GlorpSession new. - system := self new. - system platform: OraclePlatform new. - session system: system. - system session: session. - query := self queryForCustomerStation. - result := session execute: query. - ^result -] - -{ #category : #'as yet unclassified' } -TESTDescriptorSystem class >> testLocalInnerQueries [ - "self testLocalInnerQueries" - - | session system query result | - session := GlorpSession new. - system := self new. - system platform: OraclePlatform new. - session system: system. - system session: session. - query := Query read: CustomerStation where: - [:customerStation | - customerStation successor anySatisfy: - [:successor || query2 | - query2 := Query read: Successor where: - [:successor1 || feederQuery | - feederQuery := Query read: FeederStation where: - [:feederStation | feederStation id in: #(1 2 3 4)]. - feederQuery retrieve: [:feederStation | feederStation id]. - successor1 successorFeeder in: feederQuery]. - query2 retrieve: [:successor1 | successor1 id]. - successor in: query2]]. - query retrieve: [:customerStation | customerStation id]. - result := session execute: query. - ^result -] - { #category : #classes } TESTDescriptorSystem >> classModelForCustomerStation: aClassModel [