Skip to content

Commit

Permalink
cleaning up bookstore model
Browse files Browse the repository at this point in the history
  • Loading branch information
astares committed Jun 26, 2023
1 parent f2b7c0b commit fe2fb8b
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 27 deletions.
57 changes: 38 additions & 19 deletions src/Glorp-Unit-Tests/GlorpBook.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"
An book in the Bookstore model
"
Class {
#name : #GlorpBook,
#superclass : #Object,
Expand All @@ -15,107 +18,123 @@ Class {
{ #category : #examples }
GlorpBook class >> example1 [
"These examples have some shared values to assist in testing groupBy."
<sampleInstance>

^(GlorpBook new)
^(self new)
title: 'The First Book';
author: 'John Doe';
description: 'A good start';
copiesInStock: 3;
version: 1.
version: 1
]

{ #category : #examples }
GlorpBook class >> example2 [
"These examples have some shared values to assist in testing groupBy."
<sampleInstance>

^(GlorpBook new)
title: 'The Second Book';
author: 'John Doe';
description: 'A superb book';
copiesInStock: 2;
version: 2.
^ self new
title: 'The Second Book';
author: 'John Doe';
description: 'A superb book';
copiesInStock: 2;
version: 2
]

{ #category : #examples }
GlorpBook class >> example3 [
"These examples have some shared values to assist in testing groupBy."
<sampleInstance>

^(GlorpBook new)
^(self new)
title: 'The First Book';
author: 'Richard Roe';
description: 'A good start';
copiesInStock: 1;
version: 1.
version: 1
]

{ #category : #examples }
GlorpBook class >> example4 [
"These examples have some shared values to assist in testing groupBy."
<sampleInstance>

^(GlorpBook new)
^(self new)
title: 'The Second Book';
author: 'Richard Roe';
description: 'A superb book';
copiesInStock: 5;
version: 2.
version: 2
]

{ #category : #accessing }
GlorpBook >> author [
^author

^ author
]

{ #category : #accessing }
GlorpBook >> author: aString [

author := aString
]

{ #category : #accessing }
GlorpBook >> copiesInStock [
^copiesInStock

^ copiesInStock
]

{ #category : #accessing }
GlorpBook >> copiesInStock: anInteger [

copiesInStock := anInteger
]

{ #category : #accessing }
GlorpBook >> description [
^description

^ description
]

{ #category : #accessing }
GlorpBook >> description: aString [

description := aString
]

{ #category : #accessing }
GlorpBook >> id [
^id

^ id
]

{ #category : #accessing }
GlorpBook >> id: anInteger [

id := anInteger
]

{ #category : #accessing }
GlorpBook >> title [
^title

^ title
]

{ #category : #accessing }
GlorpBook >> title: aString [
title := aString.

title := aString
]

{ #category : #accessing }
GlorpBook >> version [
^version

^ version
]

{ #category : #accessing }
GlorpBook >> version: anInteger [

version := anInteger
]
17 changes: 13 additions & 4 deletions src/Glorp-Unit-Tests/GlorpBookstoreCustomer.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"
An book store customer in the Bookstore model
"
Class {
#name : #GlorpBookstoreCustomer,
#superclass : #Object,
Expand All @@ -11,22 +14,26 @@ Class {

{ #category : #accessing }
GlorpBookstoreCustomer >> accountNumber [
^accountNumber

^ accountNumber
]

{ #category : #accessing }
GlorpBookstoreCustomer >> accountNumber: anObject [

accountNumber := anObject
]

{ #category : #accessing }
GlorpBookstoreCustomer >> booksOnOrder [
^booksOnOrder

^ booksOnOrder
]

{ #category : #accessing }
GlorpBookstoreCustomer >> booksOnOrder: someBooks [
booksOnOrder := someBooks.

booksOnOrder := someBooks
]

{ #category : #initialization }
Expand All @@ -38,10 +45,12 @@ GlorpBookstoreCustomer >> initialize [

{ #category : #accessing }
GlorpBookstoreCustomer >> name [
^name

^ name
]

{ #category : #accessing }
GlorpBookstoreCustomer >> name: anObject [

name := anObject
]
2 changes: 1 addition & 1 deletion src/Glorp-Unit-Tests/GlorpMediaType.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'name',
'mimeType'
],
#category : #'Glorp-Unit-Tests-Models'
#category : #'Glorp-Unit-Tests-Models - Encyclopedia'
}

{ #category : #accessing }
Expand Down
2 changes: 1 addition & 1 deletion src/Glorp-Unit-Tests/GlorpPublisher.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Class {
'employees',
'differentBunchOfEmployeesById'
],
#category : #'Glorp-Unit-Tests-Models'
#category : #'Glorp-Unit-Tests-Models - Encyclopedia'
}

{ #category : #accessing }
Expand Down
2 changes: 1 addition & 1 deletion src/Glorp-Unit-Tests/GlorpPublisherEmployee.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Class {
'name',
'jobTitle'
],
#category : #'Glorp-Unit-Tests-Models'
#category : #'Glorp-Unit-Tests-Models - Encyclopedia'
}

{ #category : #accessing }
Expand Down
2 changes: 1 addition & 1 deletion src/Glorp-Unit-Tests/GlorpTinyPublisher.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Class {
'titles',
'titlesWithNumberInStock'
],
#category : #'Glorp-Unit-Tests-Models'
#category : #'Glorp-Unit-Tests-Models - Encyclopedia'
}

{ #category : #accessing }
Expand Down

0 comments on commit fe2fb8b

Please sign in to comment.