diff --git a/source/Sagan-Core-Tests/RepositoryBasedTest.class.st b/source/Sagan-Core-Tests/RepositoryBasedTest.class.st index a2889f6..eac7392 100644 --- a/source/Sagan-Core-Tests/RepositoryBasedTest.class.st +++ b/source/Sagan-Core-Tests/RepositoryBasedTest.class.st @@ -136,6 +136,22 @@ RepositoryBasedTest >> sistineStallone [ ^ self extraterrestrialNamedFirst: 'Sistine' last: 'Stallone' bornOn: (Date year: 1998 month: 6 day: 27) ] +{ #category : 'tests - management' } +RepositoryBasedTest >> testAddLargeNumberOfObjects [ + + self + should: [ + 1000 timesRepeat: [ + self extraterrestrials + store: self johnTravolta; + store: self johnLock; + store: self silvesterStallone; + store: self ellaTravolta + ] + ] + notTakeMoreThan: 6 seconds +] + { #category : 'tests - querying' } RepositoryBasedTest >> testCountMatching [ @@ -228,6 +244,20 @@ RepositoryBasedTest >> testFindAllMatchingSortedByBirthDate [ assert: sorted last firstName equals: 'John' ] +{ #category : 'tests - querying' } +RepositoryBasedTest >> testFindAllMatchingWhenCollectionIsLarge [ + + self testAddLargeNumberOfObjects. + self + should: [ + self + assert: ( self extraterrestrials findAllMatching: [ :extraterrestrial | + extraterrestrial firstName = 'Silvester' ] ) size + equals: 1000 + ] + notTakeMoreThan: 1 second +] + { #category : 'tests - management' } RepositoryBasedTest >> testPurge [