Force to make it green

This commit is contained in:
ziajka 2018-11-15 09:09:14 +01:00
parent 9e54287e1c
commit 320ce4a827
3 changed files with 50 additions and 4 deletions

View File

@ -16,7 +16,6 @@ import { Context } from "../models/context";
describe('SelectionListener', () => {
let selectionListener: SelectionListener;
let manager: SelectionManager;
let selectedRectangleSubject: Subject<Rectangle>;
let selectionTool: SelectionTool;
beforeEach(() => {
@ -44,8 +43,6 @@ describe('SelectionListener', () => {
const graphData = instance(mockedGraphData);
const inRectangleHelper = new InRectangleHelper();
selectedRectangleSubject = new Subject<Rectangle>();
manager = new SelectionManager();
selectionTool = new SelectionTool(new Context());
selectionListener = new SelectionListener(selectionTool, graphData, inRectangleHelper, manager);

View File

@ -0,0 +1,38 @@
export class MockedGraphDataManager {
private nodes = [];
private links = [];
private drawings = [];
private symbols = [];
public setNodes(value) {
this.nodes = value;
}
public getNodes() {
return this.nodes;
}
public setLinks(value) {
this.links = value;
}
public getLinks() {
return this.links;
}
public setDrawings(value) {
this.drawings = value;
}
public getDrawings() {
return this.drawings;
}
public setSymbols(value) {
this.symbols = value;
}
public getSymbols() {
return this.symbols;
}
}

View File

@ -5,15 +5,26 @@ import { FontFixer } from "../helpers/font-fixer";
import { NodeWidget } from "./node";
import { MapNode } from "../models/map/map-node";
import { MapLabel } from "../models/map/map-label";
import { MockedGraphDataManager } from "../managers/graph-data-manager.spec";
import { GraphDataManager } from "../managers/graph-data-manager";
import { SelectionManager } from "../managers/selection-manager";
describe('NodesWidget', () => {
let svg: TestSVGCanvas;
let widget: NodeWidget;
let graphData: MockedGraphDataManager;
beforeEach(() => {
svg = new TestSVGCanvas();
widget = new NodeWidget(new CssFixer(), new FontFixer());
graphData = new MockedGraphDataManager();
// widget = new NodeWidget(
// new CssFixer(),
// new FontFixer(),
// <GraphDataManager> <unknown> graphData,
// new SelectionManager()
// );
});
afterEach(() => {