Skip to content

Commit

Permalink
Add assertions in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Jun 17, 2024
1 parent f7cc9fe commit e90a11d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Famix-Diff-Core-Tests/FamixDiffTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,16 @@ FamixDiffTest >> packageName3 [

{ #category : #tests }
FamixDiffTest >> runDiff [
^ result := snapshot run result

| baseEntitiesToMatch targetEntitiesToMatch |
baseEntitiesToMatch := snapshot resolver entitiesToMatchIn: snapshot baseModel.
targetEntitiesToMatch := snapshot resolver entitiesToMatchIn: snapshot targetModel.

result := snapshot run result.

"Here we ensure that the generated result has the night number of changes"
self assert: baseEntitiesToMatch size equals: (result entityChanges reject: [ :change | change isAddition ]) size. "We should have a change that is not an addition for all entities of the base model."
self assert: targetEntitiesToMatch size equals: (result entityChanges reject: [ :change | change isRemoval ]) size "We should have a change that is not a removal for all entities of the target model."
]

{ #category : #running }
Expand Down

0 comments on commit e90a11d

Please sign in to comment.