|
|
|
@ -3,9 +3,6 @@ var modulePath = './../../../test/specs/code_manager'; |
|
|
|
define([ |
|
|
|
'CodeManager', |
|
|
|
modulePath + '/model/CodeModels', |
|
|
|
//modulePath + '/view/ClassTagView',
|
|
|
|
//modulePath + '/view/ClassTagsView',
|
|
|
|
//modulePath + '/e2e/ClassManager'
|
|
|
|
], |
|
|
|
function( |
|
|
|
CodeManager, |
|
|
|
@ -16,24 +13,41 @@ define([ |
|
|
|
|
|
|
|
describe('Main', function() { |
|
|
|
|
|
|
|
var obj; |
|
|
|
|
|
|
|
beforeEach(function () { |
|
|
|
this.obj = new CodeManager(); |
|
|
|
obj = new CodeManager(); |
|
|
|
}); |
|
|
|
|
|
|
|
afterEach(function () { |
|
|
|
delete this.obj; |
|
|
|
delete obj; |
|
|
|
}); |
|
|
|
|
|
|
|
it('Object exists', function() { |
|
|
|
CodeManager.should.be.exist; |
|
|
|
}); |
|
|
|
|
|
|
|
it('No code generators inside', function() { |
|
|
|
obj.getGenerators().should.be.empty; |
|
|
|
}); |
|
|
|
|
|
|
|
it('No code viewers inside', function() { |
|
|
|
obj.getViewers().should.be.empty; |
|
|
|
}); |
|
|
|
|
|
|
|
it('Add and get code generator', function() { |
|
|
|
obj.addGenerator('test', 'gen'); |
|
|
|
obj.getGenerator('test').should.equal('gen'); |
|
|
|
}); |
|
|
|
|
|
|
|
it('Add and get code viewer', function() { |
|
|
|
obj.addViewer('test', 'view'); |
|
|
|
obj.getViewer('test').should.equal('view'); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
Models.run(); |
|
|
|
//ClassTagView.run();
|
|
|
|
//ClassTagsView.run();
|
|
|
|
//e2e.run();
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |