diff --git a/packages/concerto-core/test/data/parser/classdeclaration.selfextendingasset.cto b/packages/concerto-core/test/data/parser/classdeclaration.selfextendingasset.cto deleted file mode 100644 index 1930aaa1b..000000000 --- a/packages/concerto-core/test/data/parser/classdeclaration.selfextendingasset.cto +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace com.testing - -asset Self_Extending extends Self_Extending { - o String id - o String newValue -} diff --git a/packages/concerto-core/test/data/parser/classdeclaration.selfextendingconcept.cto b/packages/concerto-core/test/data/parser/classdeclaration.selfextendingconcept.cto deleted file mode 100644 index 2d8335aca..000000000 --- a/packages/concerto-core/test/data/parser/classdeclaration.selfextendingconcept.cto +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace com.testing - -concept Self_Extending extends Self_Extending { - o String id - o String newValue -} diff --git a/packages/concerto-core/test/data/parser/classdeclaration.selfextendingevent.cto b/packages/concerto-core/test/data/parser/classdeclaration.selfextendingevent.cto deleted file mode 100644 index d24dd2db5..000000000 --- a/packages/concerto-core/test/data/parser/classdeclaration.selfextendingevent.cto +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace com.testing - -event Self_Extending extends Self_Extending { - o String id - o String newValue -} diff --git a/packages/concerto-core/test/data/parser/classdeclaration.selfextendingparticipant.cto b/packages/concerto-core/test/data/parser/classdeclaration.selfextendingparticipant.cto deleted file mode 100644 index 6c14ed6b3..000000000 --- a/packages/concerto-core/test/data/parser/classdeclaration.selfextendingparticipant.cto +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace com.testing - -participant Self_Extending extends Self_Extending { - o String id - o String newValue -} diff --git a/packages/concerto-core/test/data/parser/classdeclaration.selfextendingtransaction.cto b/packages/concerto-core/test/data/parser/classdeclaration.selfextendingtransaction.cto deleted file mode 100644 index ab470a3a3..000000000 --- a/packages/concerto-core/test/data/parser/classdeclaration.selfextendingtransaction.cto +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace com.testing - -transaction Self_Extending extends Self_Extending { - o String id - o String newValue -} diff --git a/packages/concerto-core/test/introspect/classdeclaration.js b/packages/concerto-core/test/introspect/classdeclaration.js index a7aaf8e36..78546c073 100644 --- a/packages/concerto-core/test/introspect/classdeclaration.js +++ b/packages/concerto-core/test/introspect/classdeclaration.js @@ -142,41 +142,6 @@ describe('ClassDeclaration', () => { const clazz = introspectUtils.loadLastDeclaration('test/data/parser/classdeclaration.scalararray.cto', ConceptDeclaration); clazz.validate(); }); - - it('should throw when an asset is extending itself', () => { - let asset = introspectUtils.loadLastDeclaration('test/data/parser/classdeclaration.selfextendingasset.cto', AssetDeclaration); - (() => { - asset.validate(); - }).should.throw(/Class "Self_Extending" cannot extend itself./); - }); - - it('should throw when a concept is extending itself', () => { - let concept = introspectUtils.loadLastDeclaration('test/data/parser/classdeclaration.selfextendingconcept.cto', ConceptDeclaration); - (() => { - concept.validate(); - }).should.throw(/Class "Self_Extending" cannot extend itself./); - }); - - it('should throw when an event is extending itself', () => { - let event = introspectUtils.loadLastDeclaration('test/data/parser/classdeclaration.selfextendingevent.cto', EventDeclaration); - (() => { - event.validate(); - }).should.throw(/Class "Self_Extending" cannot extend itself./); - }); - - it('should throw when a participant is extending itself', () => { - let participant = introspectUtils.loadLastDeclaration('test/data/parser/classdeclaration.selfextendingparticipant.cto', ParticipantDeclaration); - (() => { - participant.validate(); - }).should.throw(/Class "Self_Extending" cannot extend itself./); - }); - - it('should throw when a transaction is extending itself', () => { - let transaction = introspectUtils.loadLastDeclaration('test/data/parser/classdeclaration.selfextendingtransaction.cto', TransactionDeclaration); - (() => { - transaction.validate(); - }).should.throw(/Class "Self_Extending" cannot extend itself./); - }); }); describe('#accept', () => {