-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(map): adds more test coverage for MapKeyType introspection
Signed-off-by: jonathan.casey <[email protected]>
- Loading branch information
1 parent
5f627f8
commit b5d6c83
Showing
1 changed file
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -301,7 +301,6 @@ describe('MapDeclaration', () => { | |
name: 'States' | ||
} | ||
}, | ||
|
||
value: { | ||
$class: '[email protected]' | ||
} | ||
|
@@ -426,9 +425,7 @@ describe('MapDeclaration', () => { | |
clz.getKey().ast.$class.should.equal('[email protected]'); | ||
}); | ||
|
||
|
||
// TODO :: Add coverage for Object Scalars | ||
it('should return the correct values when called', () => { | ||
it('should return the correct values when called - String', () => { | ||
let clz = new MapDeclaration(modelFile, { | ||
$class: '[email protected]', | ||
name: 'MapPermutation1', | ||
|
@@ -442,7 +439,7 @@ describe('MapDeclaration', () => { | |
clz.getKey().getType().should.equal('String'); | ||
}); | ||
|
||
it('should return the correct values when called', () => { | ||
it('should return the correct values when called - DateTime', () => { | ||
let clz = new MapDeclaration(modelFile, { | ||
$class: '[email protected]', | ||
name: 'MapPermutation1', | ||
|
@@ -455,6 +452,17 @@ describe('MapDeclaration', () => { | |
}); | ||
clz.getKey().getType().should.equal('DateTime'); | ||
}); | ||
|
||
|
||
it('should return the correct values when called - Scalar DateTime', () => { | ||
let decl = introspectUtils.loadLastDeclaration('test/data/parser/mapdeclaration/mapdeclaration.goodkey.scalar.datetime.cto', MapDeclaration); | ||
decl.getKey().getType().should.equal('DATE'); | ||
}); | ||
|
||
it('should return the correct values when called - Scalar String', () => { | ||
let decl = introspectUtils.loadLastDeclaration('test/data/parser/mapdeclaration/mapdeclaration.goodkey.scalar.string.cto', MapDeclaration); | ||
decl.getKey().getType().should.equal('GUID'); | ||
}); | ||
}); | ||
|
||
describe('#getValue', () => { | ||
|