Skip to content

Commit

Permalink
Localize user-facing error text in assertIncludes:
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Aug 23, 2024
1 parent 43141db commit bb9ab19
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions source/Sagan-Core/RepositoryBehavior.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ RepositoryBehavior >> assertBoundariesAreValidFrom: aStartingPosition upTo: aMax
{ #category : 'private - preconditions' }
RepositoryBehavior >> assertIncludes: inMemoryObject [

AssertionChecker
enforce: [ ( self countMatching: [ :objectInRepository :criteria | criteria does: objectInRepository equal: inMemoryObject ] ) strictlyPositive ]
because: [ '<1p> was not found.' expandMacrosWith: inMemoryObject ]
raising: ObjectNotFound
AssertionChecker
enforce: [
( self countMatching: [ :objectInRepository :criteria |
criteria does: objectInRepository equal: inMemoryObject ] ) strictlyPositive
]
because: [ '{1} was not found.' localizedWithAll: { inMemoryObject printString } ]
raising: ObjectNotFound
]

{ #category : 'private - preconditions' }
Expand Down

0 comments on commit bb9ab19

Please sign in to comment.