@@ -264,6 +264,18 @@ MolComponentFactoryTest >> testCollectComponentConnectionTraits [
264264 self assert: (traits includes: MolUsedParameters ).
265265]
266266
267+ { #category : #tests }
268+ MolComponentFactoryTest >> testCollectComponentConnectionTraitsOrder [
269+ " This test check the order of the traits collect: events, services and parameters. This is necessary to control the order to not change generated code in existing components"
270+
271+ | traits |
272+ traits := MolComponentFactory default collectComponentConnectionTraits: MolCompleteComponentImpl .
273+ self assert: traits size equals: 3 .
274+ self assert: (traits at: 1 ) equals: MolUsedEvents .
275+ self assert: (traits at: 2 ) equals: MolUsedServices .
276+ self assert: (traits at: 3 ) equals: MolUsedParameters
277+ ]
278+
267279{ #category : #tests }
268280MolComponentFactoryTest >> testComponentChangedOnComponentCreationWithoutType [
269281 " Create a class, edit this class from different ways and check if the factory define the component or not"
@@ -1338,90 +1350,78 @@ MolComponentFactoryTest >> testRebuildComponentAccessorsFor [
13381350MolComponentFactoryTest >> testRemoveOverloadedConsumedEvents [
13391351 " Testing issue #210 fix"
13401352
1341- | exception |
1342- exception := nil .
13431353 " Remove the method which overload the services contract: no error should appears"
1344- [ MolCompleteComponentOverloadImpl class removeSelector: #consumedComponentEvents ]
1354+
1355+ [
1356+ MolCompleteComponentOverloadImpl class removeSelector:
1357+ #consumedComponentEvents ]
13451358 on: Exception
1346- do: [ :e | exception := e ].
1347-
1348- exception ifNotNil: [ exception signal ].
1349- self assert: exception isNil.
1359+ do: [ :e | e signal ]
13501360]
13511361
13521362{ #category : #' test - overload' }
13531363MolComponentFactoryTest >> testRemoveOverloadedProducedEvents [
13541364 " Testing issue #210 fix"
13551365
1356- | exception |
1357- exception := nil .
13581366 " Remove the method which overload the services contract: no error should appears"
1359- [ MolCompleteComponentOverloadImpl class removeSelector: #producedComponentEvents ]
1367+
1368+ [
1369+ MolCompleteComponentOverloadImpl class removeSelector:
1370+ #producedComponentEvents ]
13601371 on: Exception
1361- do: [ :e | exception := e ].
1362-
1363- exception ifNotNil: [ exception signal ].
1364- self assert: exception isNil.
1372+ do: [ :e | e signal ]
13651373]
13661374
13671375{ #category : #' test - overload' }
13681376MolComponentFactoryTest >> testRemoveOverloadedProvidedParameters [
13691377 " Testing issue #210 fix"
13701378
1371- | exception |
1372- exception := nil .
13731379 " Remove the method which overload the services contract: no error should appears"
1374- [ MolCompleteComponentOverloadImpl class removeSelector: #providedComponentParameters ]
1375- on: Exception
1376- do: [ :e | exception := e ].
13771380
1378- exception ifNotNil: [ exception signal ].
1379- self assert: exception isNil.
1381+ [
1382+ MolCompleteComponentOverloadImpl class removeSelector:
1383+ #providedComponentParameters ]
1384+ on: Exception
1385+ do: [ :e | e signal ]
13801386]
13811387
13821388{ #category : #' test - overload' }
13831389MolComponentFactoryTest >> testRemoveOverloadedProvidedServices [
13841390 " Testing issue #210 fix"
13851391
1386- | exception |
1387- exception := nil .
13881392 " Remove the method which overload the services contract: no error should appears"
1389- [ MolCompleteComponentOverloadImpl class removeSelector: #providedComponentServices ]
1390- on: Exception
1391- do: [ :e | exception := e ].
13921393
1393- exception ifNotNil: [ exception signal ].
1394- self assert: exception isNil.
1394+ [
1395+ MolCompleteComponentOverloadImpl class removeSelector:
1396+ #providedComponentServices ]
1397+ on: Exception
1398+ do: [ :e | e signal ]
13951399]
13961400
13971401{ #category : #' test - overload' }
13981402MolComponentFactoryTest >> testRemoveOverloadedUsedParameters [
13991403 " Testing issue #210 fix"
14001404
1401- | exception |
1402- exception := nil .
14031405 " Remove the method which overload the services contract: no error should appears"
1404- [ MolCompleteComponentOverloadImpl class removeSelector: #usedComponentParameters ]
1405- on: Exception
1406- do: [ :e | exception := e ].
14071406
1408- exception ifNotNil: [ exception signal ].
1409- self assert: exception isNil.
1407+ [
1408+ MolCompleteComponentOverloadImpl class removeSelector:
1409+ #usedComponentParameters ]
1410+ on: Exception
1411+ do: [ :e | e signal ]
14101412]
14111413
14121414{ #category : #' test - overload' }
14131415MolComponentFactoryTest >> testRemoveOverloadedUsedServices [
14141416 " Testing issue #210 fix"
14151417
1416- | exception |
1417- exception := nil .
14181418 " Remove the method which overload the services contract: no error should appears"
1419- [ MolCompleteComponentOverloadImpl class removeSelector: #usedComponentServices ]
1419+
1420+ [
1421+ MolCompleteComponentOverloadImpl class removeSelector:
1422+ #usedComponentServices ]
14201423 on: Exception
1421- do: [ :e | exception := e ].
1422-
1423- exception ifNotNil: [ exception signal ].
1424- self assert: exception isNil
1424+ do: [ :e | e signal ]
14251425]
14261426
14271427{ #category : #' test - overload' }
0 commit comments