mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-18 16:31:31 +00:00
Remove OpenActionsStubs (#106)
This commit is contained in:
@@ -3,7 +3,6 @@ import * as sinon from "sinon";
|
||||
import * as ViewModels from "../../Contracts/ViewModels";
|
||||
import DocumentClientUtilityBase from "../../Common/DocumentClientUtilityBase";
|
||||
import Q from "q";
|
||||
import { CollectionStub, DatabaseStub } from "../OpenActionsStubs";
|
||||
import { ContainerSampleGenerator } from "./ContainerSampleGenerator";
|
||||
import { CosmosClient } from "../../Common/CosmosClient";
|
||||
import { GremlinClient } from "../Graph/GraphExplorerComponent/GremlinClient";
|
||||
@@ -54,11 +53,11 @@ describe("ContainerSampleGenerator", () => {
|
||||
}
|
||||
]
|
||||
};
|
||||
const collection = new CollectionStub({ id: ko.observable(sampleCollectionId) });
|
||||
const database = new DatabaseStub({
|
||||
const collection = { id: ko.observable(sampleCollectionId) } as ViewModels.Collection;
|
||||
const database = {
|
||||
id: ko.observable(sampleDatabaseId),
|
||||
collections: ko.observableArray([collection])
|
||||
});
|
||||
collections: ko.observableArray<ViewModels.Collection>([collection])
|
||||
} as ViewModels.Database;
|
||||
database.findCollectionWithId = () => collection;
|
||||
|
||||
const explorerStub = createExplorerStub(database);
|
||||
@@ -99,11 +98,11 @@ describe("ContainerSampleGenerator", () => {
|
||||
"g.addV('person').property(id, '1').property('_partitionKey','pk').property('name', 'Eva').property('age', 44)"
|
||||
]
|
||||
};
|
||||
const collection = new CollectionStub({ id: ko.observable(sampleCollectionId) });
|
||||
const database = new DatabaseStub({
|
||||
const collection = { id: ko.observable(sampleCollectionId) } as ViewModels.Collection;
|
||||
const database = {
|
||||
id: ko.observable(sampleDatabaseId),
|
||||
collections: ko.observableArray([collection])
|
||||
});
|
||||
collections: ko.observableArray<ViewModels.Collection>([collection])
|
||||
} as ViewModels.Database;
|
||||
database.findCollectionWithId = () => collection;
|
||||
collection.databaseId = database.id();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user