Skip to content

Commit

Permalink
Added coverage for in memory repository module
Browse files Browse the repository at this point in the history
  • Loading branch information
mtabacman committed Jan 30, 2024
1 parent 975580f commit 476a1d7
Showing 1 changed file with 37 additions and 0 deletions.
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 )
]
]

0 comments on commit 476a1d7

Please sign in to comment.