Skip to content

Commit

Permalink
cleanup trade model
Browse files Browse the repository at this point in the history
  • Loading branch information
astares committed Jun 26, 2023
1 parent 030d85c commit 08a4ff4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/Glorp-Unit-Tests/GlorpAccount.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"
An account in the Trade model
"
Class {
#name : #GlorpAccount,
#superclass : #GlorpTestModelClass,
Expand Down
6 changes: 6 additions & 0 deletions src/Glorp-Unit-Tests/GlorpTestModelClass.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ Class {
#superclass : #TestAsserter,
#category : #'Glorp-Unit-Tests-Models - Trade'
}

{ #category : #testing }
GlorpTestModelClass class >> isAbstract [

^ self == GlorpTestModelClass
]
3 changes: 3 additions & 0 deletions src/Glorp-Unit-Tests/GlorpTrade.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"
A trade in the Trade model
"
Class {
#name : #GlorpTrade,
#superclass : #GlorpTestModelClass,
Expand Down
17 changes: 11 additions & 6 deletions src/Glorp-Unit-Tests/GlorpTradeDescriptorSystem.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"
A glorp descriptor system for the trade model
"
Class {
#name : #GlorpTradeDescriptorSystem,
#superclass : #GlorpTestDescriptorSystem,
Expand All @@ -13,23 +16,25 @@ GlorpTradeDescriptorSystem >> allTableNames [
{ #category : #accessing }
GlorpTradeDescriptorSystem >> classModelForGlorpAccount: aClassModel [

aClassModel newAttributeNamed: #id type: Integer.
aClassModel newAttributeNamed: #name type: String
aClassModel
newAttributeNamed: #id type: Integer;
newAttributeNamed: #name type: String
]

{ #category : #accessing }
GlorpTradeDescriptorSystem >> classModelForGlorpTrade: aClassModel [

aClassModel newAttributeNamed: #id type: Integer.
aClassModel newAttributeNamed: #account type: GlorpAccount
aClassModel
newAttributeNamed: #id type: Integer;
newAttributeNamed: #account type: GlorpAccount
]

{ #category : #accessing }
{ #category : #initialization }
GlorpTradeDescriptorSystem >> constructAllClasses [

^(super constructAllClasses)
add: GlorpAccount;
add: GlorpTrade;
add: GlorpTrade;
yourself
]

Expand Down

0 comments on commit 08a4ff4

Please sign in to comment.