Skip to content

Commit

Permalink
[Fix] - unite test all passing
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLEGOFF committed Jun 28, 2023
1 parent d208a09 commit dc36ca5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/Pyramid-Bloc/PyramidBlocCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ PyramidBlocCommand class >> addElementOnCollection [
set: [ :state :target | target addAll: state arguments ]
get: [ :state :source |
state source: source.
state arguments: source elements asArray ]
state arguments: source collection asArray ]
isExecutableBlock: [ :obj :state| obj isCollection ]
]

Expand Down Expand Up @@ -152,7 +152,7 @@ PyramidBlocCommand class >> removeElementOnCollection [
set: [ :state :target | target removeAll: state arguments ]
get: [ :state :source |
state source: source.
state arguments: source elements asArray ]
state arguments: source collection asArray ]
isExecutableBlock: [ :obj :state| obj isCollection ]
]

Expand Down
20 changes: 10 additions & 10 deletions src/Pyramid-Tests/PyramidBlocCommandTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ PyramidBlocCommandTest >> testAddElementOnCollection [
| e1 e2 e3 b1 b2 b3 state |
state := PyramidCommandState new.

e1 := PyramidObservableElementCollection new.
e1 := PyramidCollectionWithCallbacks new.
e2 := BlElement new.
e3 := BlElement new.
e1 addAll: {
Expand All @@ -70,7 +70,7 @@ PyramidBlocCommandTest >> testAddElementOnCollection [



b1 := PyramidObservableElementCollection new.
b1 := PyramidCollectionWithCallbacks new.
b2 := BlElement new.
b3 := BlElement new.

Expand All @@ -79,9 +79,9 @@ PyramidBlocCommandTest >> testAddElementOnCollection [
b2.
b3 })
on: b1.
self assert: b1 elements size equals: 2.
b1 elements indexOf: b2 ifAbsent: [ self fail ].
b1 elements indexOf: b3 ifAbsent: [ self fail ]
self assert: b1 collection size equals: 2.
b1 collection indexOf: b2 ifAbsent: [ self fail ].
b1 collection indexOf: b3 ifAbsent: [ self fail ]
]

{ #category : #tests }
Expand Down Expand Up @@ -202,7 +202,7 @@ PyramidBlocCommandTest >> testRemoveElementOnCollection [
| e1 e2 e3 b1 b2 b3 state |
state := PyramidCommandState new.

e1 := PyramidObservableElementCollection new.
e1 := PyramidCollectionWithCallbacks new.
e2 := BlElement new.
e3 := BlElement new.
e1 addAll: {
Expand All @@ -215,7 +215,7 @@ PyramidBlocCommandTest >> testRemoveElementOnCollection [
self assert: state arguments first equals: e2.
self assert: state arguments last equals: e3.

b1 := PyramidObservableElementCollection new.
b1 := PyramidCollectionWithCallbacks new.
b2 := BlElement new.
b3 := BlElement new.
b1 addAll: {
Expand All @@ -225,9 +225,9 @@ PyramidBlocCommandTest >> testRemoveElementOnCollection [
PyramidBlocCommand removeElementOnCollection
setState: (PyramidCommandState new arguments: { b2 })
on: b1.
self assert: b1 elements size equals: 1.
self assert: (b1 elements indexOf: b2) equals: 0.
b1 elements indexOf: b3 ifAbsent: [ self fail ]
self assert: b1 collection size equals: 1.
self assert: (b1 collection indexOf: b2) equals: 0.
b1 collection indexOf: b3 ifAbsent: [ self fail ]
]

{ #category : #tests }
Expand Down
5 changes: 0 additions & 5 deletions src/Pyramid-Tests/PyramidProjectModelTest.class.st

This file was deleted.

2 changes: 1 addition & 1 deletion src/Pyramid-Tests/PyramidPropertiesTestDummy.class.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Class {
#name : #PyramidPropertiesTestDummy,
#superclass : #Object,
#superclass : #BlElement,
#instVars : [
'isToto',
'string'
Expand Down
2 changes: 1 addition & 1 deletion src/Pyramid-Tests/PyramidPropertiesViewTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ PyramidPropertiesViewTest >> testUpdatePropertyViews [
Verify <A> <B> targetModel is not empty, <C> targetModel is empty."

| propertyA propertyB propertyC view activeProject |
activeProject := PyramidActiveProjectModel new.
activeProject := PyramidProjectModel new.

propertyA := PyramidProperty new
command: self alwaysTrueCommand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PyramidPropertyInputModelBuilderTest >> testEmptyModel [

self assert: property inputsModel elementInputsModel size equals: 0.
self assert: property inputsModel stateInputsModel size equals: 0.
self assert: property inputsModel applyToAllInput text equals: '# no values'
self deny: property inputsModel shouldDisplay
]

{ #category : #tests }
Expand Down
4 changes: 2 additions & 2 deletions src/Pyramid/PyramidProperty.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ PyramidProperty class >> fromCommand: aPyramidCommand inputBuilder: aPyramidProp
{ #category : #sorting }
PyramidProperty class >> sortBlElements: a and: b [

a parent
= b parent ifTrue: [
(a parent
= b parent and: [ a parent isNotNil ]) ifTrue: [
^ (a parent childIndexOf: a)
<= (a parent childIndexOf:
b) ].
Expand Down

0 comments on commit dc36ca5

Please sign in to comment.