2014-03-06 04:46:41 +08:00
|
|
|
"use strict";
|
2013-10-25 05:25:42 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
var Cylon = lib("../index");
|
2014-05-14 10:48:50 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
var MCP = lib("mcp"),
|
|
|
|
API = lib("api"),
|
|
|
|
Robot = lib("robot"),
|
2015-06-09 22:21:03 +08:00
|
|
|
Driver = lib("driver"),
|
2015-06-23 09:10:09 +08:00
|
|
|
Adaptor = lib("adaptor"),
|
|
|
|
Utils = lib("utils"),
|
|
|
|
Config = lib("config"),
|
|
|
|
Logger = lib("logger");
|
2014-07-16 03:27:16 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
var IO = {
|
|
|
|
DigitalPin: lib("io/digital-pin"),
|
|
|
|
Utils: lib("io/utils")
|
|
|
|
};
|
2014-05-14 10:48:50 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
describe("Cylon", function() {
|
|
|
|
it("exports the MCP as Cylon.MCP", function() {
|
|
|
|
expect(Cylon.MCP).to.be.eql(MCP);
|
2014-05-14 10:48:50 +08:00
|
|
|
});
|
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
it("exports the Robot as Cylon.Robot", function() {
|
|
|
|
expect(Cylon.Robot).to.be.eql(Robot);
|
2014-02-28 05:54:04 +08:00
|
|
|
});
|
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
it("exports the Driver as Cylon.Driver", function() {
|
|
|
|
expect(Cylon.Driver).to.be.eql(Driver);
|
2014-02-28 05:54:04 +08:00
|
|
|
});
|
2014-02-28 09:39:02 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
it("exports the Adaptor as Cylon.Adaptor", function() {
|
|
|
|
expect(Cylon.Adaptor).to.be.eql(Adaptor);
|
|
|
|
});
|
2014-03-10 10:17:40 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
it("exports the Utils as Cylon.Utils", function() {
|
|
|
|
expect(Cylon.Utils).to.be.eql(Utils);
|
2014-03-10 10:17:40 +08:00
|
|
|
});
|
2014-03-10 10:18:45 +08:00
|
|
|
|
2014-09-04 06:04:36 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
it("exports the Logger as Cylon.Logger", function() {
|
|
|
|
expect(Cylon.Logger).to.be.eql(Logger);
|
|
|
|
});
|
2014-09-04 06:04:36 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
it("exports the IO DigitalPin and Utils as Cylon.IO", function() {
|
|
|
|
expect(Cylon.IO).to.be.eql(IO);
|
|
|
|
});
|
2014-09-04 06:04:36 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
describe("#robot", function() {
|
|
|
|
it("proxies to MCP.create", function() {
|
|
|
|
expect(Cylon.robot).to.be.eql(MCP.create);
|
2014-09-04 06:04:36 +08:00
|
|
|
});
|
2015-06-23 09:10:09 +08:00
|
|
|
});
|
2014-09-04 06:04:36 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
describe("#start", function() {
|
|
|
|
it("proxies to MCP.start", function() {
|
|
|
|
expect(Cylon.start).to.be.eql(MCP.start);
|
2014-09-16 05:46:24 +08:00
|
|
|
});
|
2014-09-04 06:04:36 +08:00
|
|
|
});
|
|
|
|
|
2014-03-12 01:44:11 +08:00
|
|
|
describe("#halt", function() {
|
2015-06-23 09:10:09 +08:00
|
|
|
it("proxies to MCP.halt", function() {
|
|
|
|
expect(Cylon.halt).to.be.eql(MCP.halt);
|
2014-03-10 10:18:45 +08:00
|
|
|
});
|
|
|
|
});
|
2014-07-16 03:27:16 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
describe("#api", function() {
|
|
|
|
it("proxies to API.create", function() {
|
|
|
|
expect(Cylon.api).to.be.eql(API.create);
|
2014-12-16 01:37:52 +08:00
|
|
|
});
|
2015-06-23 09:10:09 +08:00
|
|
|
});
|
2015-01-06 04:20:53 +08:00
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
describe("#config", function() {
|
|
|
|
it("proxies to Config.update", function() {
|
|
|
|
expect(Cylon.config).to.be.eql(Config.update);
|
2015-01-06 04:20:53 +08:00
|
|
|
});
|
2014-07-16 03:27:16 +08:00
|
|
|
});
|
2014-02-28 05:54:04 +08:00
|
|
|
});
|