Commit f18575c5 authored by Ray Bellis's avatar Ray Bellis

more units tests for Dictionary

parent dc6bb87d
......@@ -37,6 +37,11 @@ describe('Dictionary', () => {
assert.equal(Dictionary.get(254).name, 'Unknown-Attribute-254');
});
it('should correctly return a VSA by name', () => {
assert.equal(Dictionary.get('Lucent-User-Priority').id, 26);
assert.equal(Dictionary.get('Lucent-User-Priority').sub_id, 8);
});
it('should return the same entry if an unknown ID is requested twice', () => {
assert.equal(Dictionary.get(254), Dictionary.get(254));
});
......@@ -94,13 +99,10 @@ describe('Dictionary', () => {
assert.throws(() => Dictionary.vsa(1, () => {}), TypeError);
});
it('should correctly return a VSA by name', () => {
assert.equal(Dictionary.get('Lucent-User-Priority').id, 26);
assert.equal(Dictionary.get('Lucent-User-Priority').sub_id, 8);
});
it('should correctly return an attribute by id', () => {
it('should correctly return a VSA by id', () => {
assert.equal(Dictionary.vsa(4846, 18).name, 'Lucent-Session-Type');
assert.equal(Dictionary.vsa(4846, 2000).name, 'Lucent-Unknown-Attribute-2000');
assert.equal(Dictionary.vsa(100, 200).name, 'Vendor100-Unknown-Attribute-200');
});
it('should return the same entry if an unknown value is requested twice', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment