-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added coverage for in memory repository module
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
source/Sagan-Kepler-Tests/InMemoryRepositoryProviderModuleTest.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Class { | ||
#name : 'InMemoryRepositoryProviderModuleTest', | ||
#superclass : 'TestCase', | ||
#category : 'Sagan-Kepler-Tests', | ||
#package : 'Sagan-Kepler-Tests' | ||
} | ||
|
||
{ #category : 'private - accessing' } | ||
InMemoryRepositoryProviderModuleTest >> repositoryIn: aUserStory [ | ||
|
||
^ aUserStory rootSystem >> #RepositoryProviderSystem | ||
createRepositoryFor: #mainDB | ||
storingObjectsOfType: CelestialBody | ||
checkingConflictsAccordingTo: DoNotCheckForConflictsStrategy new | ||
] | ||
|
||
{ #category : 'tests' } | ||
InMemoryRepositoryProviderModuleTest >> testInstallation [ | ||
|
||
| userStory celestialBodies | | ||
|
||
userStory := self userStoryTest. | ||
userStory setUp. | ||
celestialBodies := self repositoryIn: userStory. | ||
|
||
self assert: celestialBodies findAll isEmpty | ||
] | ||
|
||
{ #category : 'private - accessing' } | ||
InMemoryRepositoryProviderModuleTest >> userStoryTest [ | ||
|
||
^ PluggableUserStoryTest requiring: [ :test | | ||
test registerSubsystem: ( RepositoryProviderSystem new | ||
register: InMemoryRepositoryProvider new as: #mainDB; | ||
yourself ) | ||
] | ||
] |