How to use the typemoq.It.isAny function in typemoq

To help you get started, we’ve selected a few typemoq examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tierratelematics / prettygoat / test / cassandra / CassandraStreamFactorySpec.ts View on Github external
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();
github tierratelematics / prettygoat / test / ProjectionFactorySpec.ts View on Github external
        objectContainer.setup(o => o.resolve(It.isAny())).returns(() => new MockProjectionDefinition());
github tierratelematics / ninjagoat / test / ContextFactorySpec.ts View on Github external
            viewResolver.setup(v => v.resolve(It.isAny(), It.isAny())).returns(() => BarView);
            uriResolver.setup(u => u.resolve(It.isAny())).returns(() => {
github node-ts / bus / packages / bus-core / src / application-bootstrap / application-bootstrap.spec.ts View on Github external
h => h.register(


A simple mocking library for TypeScript

Latest version published 6 years ago

Package Health Score

50 / 100
Full package analysis