Skip to content

Commit

Permalink
Removed tags deprecation warnings, fixed antipatterns
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Nov 16, 2024
1 parent 2ca178a commit e0501e5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ OntoUMLVerificationUpdater >> getVerifications [

^ (self packageOrganizer packageNamed:
'Openponk-OntoUML-Verifications') definedClasses select: [ :class |
class tags asSet includes: 'Verification-Classes' "or: (class tags asSet includes: 'Antipattern-Classes')" ]
class packageTag name = 'Verification-Classes' "or: [ class packageTag name = 'Antipattern-Classes' ]" ]
]

{ #category : 'constants' }
Expand Down
14 changes: 8 additions & 6 deletions OpenPonk-OntoUML-Verifications/VerificationController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ VerificationController >> detectAntiPatternsIn: aVerifiedModel [

{ #category : 'verification' }
VerificationController >> getAntiPatternVerifications [
^ (self packageOrganizer packageNamed: 'Openponk-OntoUML-Verifications')
definedClasses
select: [ :class | class tags asSet includes: 'Antipattern-Classes'. ].

^ (self packageOrganizer packageNamed:
'OpenPonk-OntoUML-Verifications') definedClasses select: [ :class |
class packageTag name = 'Antipattern-Classes' ]
]

{ #category : 'verification' }
VerificationController >> getVerifications [
^ (self packageOrganizer packageNamed: 'OpenPonk-OntoUML-Verifications')
definedClasses
select: [ :class | class tags asSet includes: 'Verification-Classes' ].

^ (self packageOrganizer packageNamed:
'OpenPonk-OntoUML-Verifications') definedClasses select: [ :class |
class packageTag name = 'Verification-Classes' ]
]

{ #category : 'verification' }
Expand Down
24 changes: 18 additions & 6 deletions OpenPonk-OntoUML-Verifications/VerificationControllerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,35 @@ Class {

{ #category : 'tests' }
VerificationControllerTest >> testGetAntiPatternVerifications [
| controller antiPatternVerifications |

| controller antiPatternVerifications |
controller := VerificationController new.
antiPatternVerifications := controller getAntiPatternVerifications.
self assert: (antiPatternVerifications isKindOf: Collection).
self assert: (antiPatternVerifications isEmpty) equals: false.
self assert: (antiPatternVerifications allSatisfy: [ :verificationClass | verificationClass tags asSet includes: 'Antipattern-Classes'. ]) equals: true.
self assert: antiPatternVerifications isEmpty equals: false.
self
assert:
(antiPatternVerifications allSatisfy: [ :verificationClass |
verificationClass packageTag name = 'Antipattern-Classes' ])
equals: true
]

{ #category : 'tests' }
VerificationControllerTest >> testGetVerifications [

| controller verifications |
controller := VerificationController new.
verifications := controller getVerifications.
self assert: (verifications isKindOf: Collection).
self assert: (verifications isEmpty) equals: false.
self assert: (verifications anySatisfy: [ :verificationClass | verificationClass = Verification ]) equals: true.
self assert: (verifications allSatisfy: [ :verificationClass | verificationClass tags asSet includes: 'Verification-Classes'. ]) equals: true.
self assert: verifications isEmpty equals: false.
self
assert: (verifications anySatisfy: [ :verificationClass |
verificationClass = Verification ])
equals: true.
self
assert: (verifications allSatisfy: [ :verificationClass |
verificationClass packageTag name = 'Verification-Classes' ])
equals: true
]

{ #category : 'tests' }
Expand Down

0 comments on commit e0501e5

Please sign in to comment.