Skip to content

Commit

Permalink
Merge pull request #35 from moosetechnology/34-We-should-be-able-to-t…
Browse files Browse the repository at this point in the history
…ag-a-MooseGroup

Fix #34
  • Loading branch information
LABSARI authored Jun 28, 2024
2 parents 69f507f + 107d20b commit 809d971
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/Famix-Tagging-Tests/FamixTagMooseGroupTest.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Class {
#name : #FamixTagMooseGroupTest,
#superclass : #TestCase,
#instVars : [
'model'
],
#category : #'Famix-Tagging-Tests'
}

{ #category : #running }
FamixTagMooseGroupTest >> setUp [

super setUp.
model := FamixTagMockModelBuilder buildModel
]

{ #category : #tests }
FamixTagMooseGroupTest >> testTagMooseGroup [

| mooseGroup tag |
mooseGroup := model allModelClasses.
tag := model tagNamed: 'myTag'.
mooseGroup tagEntitiesWith: tag.

self assert: (mooseGroup first hasTagNamed: 'myTag').
self assert: (mooseGroup second hasTagNamed: 'myTag')

]

{ #category : #tests }
FamixTagMooseGroupTest >> testTagMooseGroupWithName [

| mooseGroup |
mooseGroup := model allModelClasses.

mooseGroup tagEntitiesWithName: 'myTag'.

self assert: (mooseGroup first hasTagNamed: 'myTag').
self assert: (mooseGroup second hasTagNamed: 'myTag')

]
13 changes: 13 additions & 0 deletions src/Famix-Tagging/MooseGroup.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Extension { #name : #MooseGroup }

{ #category : #'*Famix-Tagging' }
MooseGroup >> tagEntitiesWith: aTag [

self do: [ :e | e tagWith: aTag ]
]

{ #category : #'*Famix-Tagging' }
MooseGroup >> tagEntitiesWithName: aTagName [

self do: [ :e | e tagWithName: aTagName ]
]

0 comments on commit 809d971

Please sign in to comment.