Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import "reflect-metadata";
import expect = require("expect.js");
import {Mock, IMock, Times, It} from "typemoq";
import CassandraStreamFactory from "../../scripts/cassandra/CassandraStreamFactory";
import TimePartitioner from "../../scripts/cassandra/TimePartitioner";
import {ICassandraClient, IQuery} from "../../scripts/cassandra/ICassandraClient";
import * as Rx from "rx";
import {Event} from "../../scripts/streams/Event";
import IDateRetriever from "../../scripts/util/IDateRetriever";
import IEventsFilter from "../../scripts/cassandra/IEventsFilter";
import IEventDeserializer from "../../scripts/streams/IEventDeserializer";
const anyValue = It.isAny();
describe("Cassandra stream factory, given a stream factory", () => {
let client: IMock;
let subject: CassandraStreamFactory;
let timePartitioner: IMock;
let events: Event[];
let dateRetriever: IMock;
let endDate = new Date(600);
beforeEach(() => {
events = [];
dateRetriever = Mock.ofType();
let eventsFilter = Mock.ofType();
timePartitioner = Mock.ofType(TimePartitioner);
let deserializer = Mock.ofType();
objectContainer.setup(o => o.resolve(It.isAny())).returns(() => new MockProjectionDefinition());
viewResolver.setup(v => v.resolve(It.isAny(), It.isAny())).returns(() => BarView);
uriResolver.setup(u => u.resolve(It.isAny())).returns(() => {
h => h.register(
TestCommand.NAME,
It.isAny(),
TestCommandHandler,
TestCommand
),
Times.once()