1
0
Fork 0

Added a test for the FoxxAdapter in the graphViewer

This commit is contained in:
Michael Hackstein 2013-06-24 09:27:26 +02:00
parent 2f113aea14
commit 0bbf2cf4e5
3 changed files with 14 additions and 3 deletions

View File

@ -40,9 +40,7 @@ function FoxxAdapter(nodes, edges, route, config) {
if (route === undefined) {
throw "The route has to be given.";
}
var self = this,
absAdapter = new AbstractAdapter(nodes, edges),
routes = {},

View File

@ -1,6 +1,6 @@
/*jslint indent: 2, nomen: true, maxlen: 100, white: true plusplus: true */
/*global _*/
/*global ArangoAdapter, JSONAdapter */
/*global ArangoAdapter, JSONAdapter, FoxxAdapter */
/*global ForceLayouter, EdgeShaper, NodeShaper, ZoomManager */
////////////////////////////////////////////////////////////////////////////////
/// @brief Graph functionality

View File

@ -113,6 +113,19 @@ describe("Graph Viewer", function() {
).not.toThrow();
});
it('should be able to be setup with a foxx adapter', function() {
var route = "foxx/route",
adapterConfig = {type: "foxx", route: route},
gv;
spyOn(window, "FoxxAdapter");
gv = new GraphViewer(svg, 10, 10, adapterConfig);
expect(window.FoxxAdapter).wasCalledWith(
jasmine.any(Array),
jasmine.any(Array),
route,
jasmine.any(Object)
);
});
});