2017-07-20 02:06:12 +07:00
|
|
|
import Assert = require("assert");
|
|
|
|
import Sinon = require("sinon");
|
|
|
|
import { MongoClientStub } from "../../mocks/connectors/mongo/MongoClientStub";
|
2017-10-07 05:09:42 +07:00
|
|
|
import { MongoCollectionFactory } from "../../../src/lib/storage/mongo/MongoCollectionFactory";
|
2017-07-20 02:06:12 +07:00
|
|
|
|
|
|
|
describe("MongoCollectionFactory", function () {
|
|
|
|
let mongoClient: MongoClientStub;
|
|
|
|
|
|
|
|
before(function() {
|
|
|
|
mongoClient = new MongoClientStub();
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("create", function () {
|
|
|
|
it("should create a collection", function () {
|
|
|
|
const COLLECTION_NAME = "COLLECTION_NAME";
|
|
|
|
|
|
|
|
const factory = new MongoCollectionFactory(mongoClient);
|
|
|
|
Assert(factory.build(COLLECTION_NAME));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|