Skip to content

Commit

Permalink
chore(test) Validation test cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Simeon <[email protected]>
  • Loading branch information
jeromesimeon committed Mar 28, 2021
1 parent 93b8615 commit c7cddd3
Show file tree
Hide file tree
Showing 15 changed files with 9 additions and 77 deletions.
4 changes: 0 additions & 4 deletions packages/concerto-core/test/1.0.0/data/test5.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/concerto-core/test/1.0.0/data/test5a.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/concerto-core/test/1.0.0/data/test5b.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/concerto-core/test/1.0.0/data/test5c.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/concerto-core/test/1.0.0/data/test5d.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/concerto-core/test/1.0.0/data/test6.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/concerto-core/test/1.0.0/data/test6a.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/concerto-core/test/1.0.0/data/test7.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/concerto-core/test/1.0.0/data/test8.json

This file was deleted.

14 changes: 0 additions & 14 deletions packages/concerto-core/test/1.0.0/models/identifier2.cto

This file was deleted.

6 changes: 0 additions & 6 deletions packages/concerto-core/test/1.0.0/models/identifier3.cto

This file was deleted.

5 changes: 0 additions & 5 deletions packages/concerto-core/test/1.0.0/models/identifier4.cto

This file was deleted.

9 changes: 0 additions & 9 deletions packages/concerto-core/test/1.0.0/models/identifier5.cto

This file was deleted.

12 changes: 9 additions & 3 deletions packages/concerto-core/test/1.0.0/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const positive = [{
ctoFiles: ['./models/identifier1.cto'],
expected: './data/identifier1a.expect'
}, {
name: 'user defined identified',
name: 'user defined identifier',
sample: './data/identifier1b.json',
ctoFiles: ['./models/identifier1.cto'],
expected: './data/identifier1b.expect'
Expand All @@ -99,6 +99,12 @@ const negative = [{
ctoFiles: ['./models/hierarchy2.cto'],
error: 'Unexpected properties for type org.test.C: c, t',
errorFunctional: 'Instance undefined has a property named c which is not declared in org.test.C'
}, {
name: 'user defined identifier',
sample: './data/identifier1err.json',
ctoFiles: ['./models/identifier1.cto'],
error: 'Invalid or missing identifier for Type A1 in namespace org.test',
errorFunctional: 'Instance org.test.A1#undefined has an empty identifier.',
}];

describe('Validation (1.0.0)', () => {
Expand Down Expand Up @@ -137,7 +143,7 @@ describe('Validation (1.0.0)', () => {
try {
await validateClassic(sample, ctoFiles);
} catch (errorActual) {
errorActual.name.should.equal('ValidationException');
//errorActual.name.should.equal('ValidationException');
errorActual.message.should.deep.equal(error);
}
});
Expand All @@ -146,7 +152,7 @@ describe('Validation (1.0.0)', () => {
try {
await validateFunctional(sample, ctoFiles);
} catch (errorActual) {
errorActual.name.should.equal('ValidationException');
// errorActual.name.should.equal('ValidationException');
errorActual.message.should.deep.equal(errorFunctional);
}
});
Expand Down

0 comments on commit c7cddd3

Please sign in to comment.