Skip to content

Commit

Permalink
Merge pull request #73 from ba-st/fix-compatibility
Browse files Browse the repository at this point in the history
Restore instance creation message to ensure backward compatibility
  • Loading branch information
gcotelli authored Jan 4, 2022
2 parents 14652cc + c919322 commit 363f094
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 5 deletions.
18 changes: 18 additions & 0 deletions source/Sagan-Kepler-Tests/CelestialBody.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,24 @@ CelestialBody class >> named: aName locatedAt: aGalacticCoordinates in: aPlaneta
^ self new initializeNamed: aName locatedAt: aGalacticCoordinates in: aPlanetarySystem
]

{ #category : #comparing }
CelestialBody >> = anObject [

^ PersistentObjectComparer new shouldConsider: self asEqualTo: anObject
]

{ #category : #accessing }
CelestialBody >> galacticCoordinates [

^ galacticCoordinates
]

{ #category : #comparing }
CelestialBody >> hash [

^ PersistentObjectComparer new hashFor: self
]

{ #category : #initialization }
CelestialBody >> initializeNamed: aName locatedAt: aGalacticCoordinates in: aPlanetarySystem [

Expand All @@ -40,3 +52,9 @@ CelestialBody >> planetarySystem [

^ planetarySystem
]

{ #category : #accessing }
CelestialBody >> sequentialNumber [

^ sequentialNumber
]
18 changes: 18 additions & 0 deletions source/Sagan-Kepler-Tests/ExtraterrestialRace.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ ExtraterrestialRace class >> named: aName foundIn: aListOfCelestialBodies [
^self new initializeNamed: aName foundIn: aListOfCelestialBodies
]

{ #category : #comparing }
ExtraterrestialRace >> = anObject [

^ PersistentObjectComparer new shouldConsider: self asEqualTo: anObject
]

{ #category : #comparing }
ExtraterrestialRace >> hash [

^ PersistentObjectComparer new hashFor: self
]

{ #category : #initialization }
ExtraterrestialRace >> initializeNamed: aName foundIn: aListOfCelestialBodies [

Expand All @@ -33,3 +45,9 @@ ExtraterrestialRace >> name [

^ name
]

{ #category : #comparing }
ExtraterrestialRace >> sequentialNumber [

^ sequentialNumber
]
8 changes: 4 additions & 4 deletions source/Sagan-RDBMS-Tests/CelestialBodyRepositoryTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ CelestialBodyRepositoryTest >> testFilterByCoordinateX [
self
assert: found name equals: 'Alderaan';
assert: found planetarySystem equals: 'Kuat Sector';
assert: found galacticCoordinates x equals: 70;
assert: found galacticCoordinates y equals: 35;
assert: found galacticCoordinates x closeTo: 70;
assert: found galacticCoordinates y closeTo: 35;
assert: found galacticCoordinates z equals: 0
]
]
Expand All @@ -67,8 +67,8 @@ CelestialBodyRepositoryTest >> testFilterByCoordinateY [
self
assert: found name equals: 'Tatooine';
assert: found planetarySystem equals: 'Arkanis Sector';
assert: found galacticCoordinates x equals: 296;
assert: found galacticCoordinates y equals: -248;
assert: found galacticCoordinates x closeTo: 296;
assert: found galacticCoordinates y closeTo: -248;
assert: found galacticCoordinates z equals: 0
]
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RepositoryProviderSystemBasedTest >> repositoriesContainerName [
{ #category : #running }
RepositoryProviderSystemBasedTest >> repositoryProvider [

^ RDBMSRepositoryProvider usingSingleSessionWith: SingleSessionRDMBSRepositoryTest login
^ RDBMSRepositoryProvider using: SingleSessionRDMBSRepositoryTest login
]

{ #category : #running }
Expand Down
6 changes: 6 additions & 0 deletions source/Sagan-RDBMS/RDBMSRepositoryProvider.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ RDBMSRepositoryProvider class >> obtainingSessionFrom: aSessionProvider [
^ self new initializeObtainingSessionFrom: aSessionProvider
]

{ #category : #'instance creation' }
RDBMSRepositoryProvider class >> using: aLogin [

^ self usingSessionPoolWith: aLogin configuredBy: [ :options | ]
]

{ #category : #'instance creation' }
RDBMSRepositoryProvider class >> usingSessionPoolWith: aLogin configuredBy: configurationAction [

Expand Down

0 comments on commit 363f094

Please sign in to comment.