Add getId() method for ol.render.Feature

This commit is contained in:
Andreas Hocevar
2017-05-11 15:54:20 +02:00
parent 1d7144564c
commit df72d7b20f
5 changed files with 38 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ describe('ol.render.Feature', function() {
describe('Constructor', function() {
it('creates an instance', function() {
renderFeature =
new ol.render.Feature(type, flatCoordinates, ends, properties);
new ol.render.Feature(type, flatCoordinates, ends, properties, 'foo');
expect(renderFeature).to.be.a(ol.render.Feature);
});
});
@@ -57,6 +57,12 @@ describe('ol.render.Feature', function() {
});
});
describe('#getId()', function() {
it('returns the feature id', function() {
expect(renderFeature.getId()).to.be('foo');
});
});
describe('#getProperties()', function() {
it('returns the properties it was created with', function() {
expect(renderFeature.getProperties()).to.equal(properties);