Skip to content

Commit

Permalink
Merge pull request #702 from moosetechnology/when-do
Browse files Browse the repository at this point in the history
Remove some deprecated calls in P12
  • Loading branch information
jecisc authored Jan 30, 2024
2 parents 9302a1c + 33f5aab commit ca48086
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Moose-Core-Tests/MooseModelTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ MooseModelTest >> testAdd [

{ #category : #tests }
MooseModelTest >> testAddAnnouncement [

| entity announcedEntity |
entity := MooseEntity new.
group announcer when: MooseEntityAdded do: [ :a | announcedEntity := a entity ].
group announcer when: MooseEntityAdded do: [ :a | announcedEntity := a entity ] for: self.

group add: entity.
self assert: announcedEntity identicalTo: entity
Expand Down Expand Up @@ -57,10 +58,11 @@ MooseModelTest >> testAsMSEString [

{ #category : #tests }
MooseModelTest >> testBookmarkAsRaisesAnnouncement [

| entity1 announcedEntity |
entity1 := MooseEntity new.
group add: entity1.
group announcer when: MooseEntityAdded do: [ :a | announcedEntity := a entity ].
group announcer when: MooseEntityAdded do: [ :a | announcedEntity := a entity ] for: self.

entity1 bookmarkAs: 'one'.
self assert: announcedEntity isNotNil
Expand Down Expand Up @@ -162,9 +164,10 @@ MooseModelTest >> testRemoveAllEntity [

{ #category : #tests }
MooseModelTest >> testRemoveAnnouncement [

| entity announcedEntity |
entity := MooseEntity new.
group announcer when: MooseEntityRemoved do: [ :a | announcedEntity := a entity ].
group announcer when: MooseEntityRemoved do: [ :a | announcedEntity := a entity ] for: self.
group add: entity.
self assert: announcedEntity isNil.
group remove: entity.
Expand Down Expand Up @@ -213,8 +216,9 @@ MooseModelTest >> testRemoveModelNamedFromRoot [

{ #category : #tests }
MooseModelTest >> testRenamedAnnouncement [

| oldName |
group announcer when: MooseEntityRenamed do: [ :a | oldName := a oldName ].
group announcer when: MooseEntityRenamed do: [ :a | oldName := a oldName ] for: self.
group name: #somename.
self assert: oldName equals: #noname.
group name: #anothername.
Expand Down

0 comments on commit ca48086

Please sign in to comment.