-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from moosetechnology/34-We-should-be-able-to-t…
…ag-a-MooseGroup Fix #34
- Loading branch information
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ] | ||
] |