Skip to content

Commit

Permalink
test(self-extending): remove redundant tests (codepath covered in con…
Browse files Browse the repository at this point in the history
…certo-cto)

Signed-off-by: Stefan Blaginov <stefanblaginov@gmail.com>
Signed-off-by: Stefan Blaginov <Stefan.Blaginov@docusign.com>
  • Loading branch information
Stefan Blaginov authored and Stefan Blaginov committed Nov 27, 2023
1 parent d9b472d commit 90f29f5
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 135 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

35 changes: 0 additions & 35 deletions packages/concerto-core/test/introspect/classdeclaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 90f29f5

Please sign in to comment.