"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@vived/core");
const ClearCorrectObjectIdsUCMock_1 = require("../Mocks/ClearCorrectObjectIdsUCMock");
const clearCorrectObjectPickIDs_1 = require("./clearCorrectObjectPickIDs");
function makeTestRig() {
    const appObjects = (0, core_1.makeAppObjectRepo)();
    const mockUC = (0, ClearCorrectObjectIdsUCMock_1.makeClearCorrectObjectIdsUCMock)(appObjects);
    return { appObjects, mockUC };
}
describe("Clear correct object pick IDs", () => {
    it("Calls the UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        (0, clearCorrectObjectPickIDs_1.clearCorrectObjectPickIDs)(appObjects);
        expect(mockUC.clearCorrectObjectIds).toHaveBeenCalledWith();
    });
    it("Warns if there is no UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        mockUC.dispose();
        appObjects.submitWarning = jest.fn();
        (0, clearCorrectObjectPickIDs_1.clearCorrectObjectPickIDs)(appObjects);
        expect(appObjects.submitWarning).toHaveBeenCalled();
    });
});
//# sourceMappingURL=clearCorrectObjectPickIDs.test.js.map