1st version parsing for class diagrams, fetching data from parsing

This commit is contained in:
knsv
2015-10-28 08:12:47 +01:00
parent d3a025acd6
commit a694f61003
5 changed files with 221 additions and 75 deletions

View File

@@ -6,7 +6,7 @@ describe('class diagram, ', function () {
var ex, cd;
beforeEach(function () {
cd = require('./parser/classDiagram').parser;
//cd.yy = require('./classeDb');
cd.yy = require('./classDb');
});
it('should handle relation definitions', function () {
@@ -105,4 +105,21 @@ class User {
});
});
describe('when fetchiing data an classDiagram graph it', function () {
var ex, cd;
beforeEach(function () {
cd = require('./parser/classDiagram').parser;
cd.yy = require('./classDb');
cd.yy.clear();
});
it('should handle relation definitions', function () {
var str = `classDiagram
Class01 <|-- Class02`;
cd.parse(str);
expect(cd.yy.getClass('Class01').id).toBe('Class01');
expect(cd.yy.getClass('Class02').id).toBe('Class02');
});
});
});