2018-10-18 09:19:10 +02:00
|
|
|
import {assert} from "chai"
|
|
|
|
import OceanBaseMock from "../mocks/OceanBase.Mock"
|
2018-10-16 14:56:18 +02:00
|
|
|
|
|
|
|
describe("OceanBase", () => {
|
|
|
|
|
|
|
|
describe("#getId()", () => {
|
|
|
|
|
|
|
|
it("should get the id", async () => {
|
|
|
|
|
|
|
|
const id = "test"
|
2018-10-18 09:19:10 +02:00
|
|
|
const oceanBase = new OceanBaseMock(id)
|
2018-10-16 14:56:18 +02:00
|
|
|
|
|
|
|
assert(oceanBase.getId() === id)
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
describe("#setId()", () => {
|
|
|
|
|
|
|
|
it("should get the id", async () => {
|
|
|
|
|
|
|
|
const id = "test"
|
2018-10-18 09:19:10 +02:00
|
|
|
const oceanBase = new OceanBaseMock()
|
2018-10-16 14:56:18 +02:00
|
|
|
oceanBase.setId(id)
|
|
|
|
|
|
|
|
assert(oceanBase.getId() === id)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|