"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@vived/core");
const RemoveCorrectObjectIdUcMock_1 = require("../Mocks/RemoveCorrectObjectIdUcMock");
const removeCorrectObjectPickID_1 = require("./removeCorrectObjectPickID");
function makeTestRig() {
    const appObjects = (0, core_1.makeAppObjectRepo)();
    const mockUC = (0, RemoveCorrectObjectIdUcMock_1.makeRemoveCorrectObjectIdUcMock)(appObjects);
    return { appObjects, mockUC };
}
describe("Removed correct object pick ID", () => {
    it("Calls the UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        (0, removeCorrectObjectPickID_1.removeCorrectObjectPickID)("obj1", appObjects);
        expect(mockUC.removeCorrectObjectId).toHaveBeenCalledWith("obj1");
    });
    it("Warns if there is no UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        mockUC.dispose();
        appObjects.submitWarning = jest.fn();
        (0, removeCorrectObjectPickID_1.removeCorrectObjectPickID)("obj1", appObjects);
        expect(appObjects.submitWarning).toHaveBeenCalled();
    });
});
//# sourceMappingURL=removeCorrectObjectPickID.test.js.map