import { makeAppObjectRepo } from "@vived/core";
import { makeAddCorrectObjectIdUcMock } from "../Mocks/AddCorrectObjectIdUcMock";
import { addCorrectObjectPickID } from "./addCorrectObjectPickID";
function makeTestRig() {
    const appObjects = makeAppObjectRepo();
    const mockUC = makeAddCorrectObjectIdUcMock(appObjects);
    return { appObjects, mockUC };
}
describe("Add correct object pick ID", () => {
    it("Calls the UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        addCorrectObjectPickID("obj1", appObjects);
        expect(mockUC.addCorrectObjectId).toHaveBeenCalledWith("obj1");
    });
    it("Warns if there is no UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        mockUC.dispose();
        appObjects.submitWarning = jest.fn();
        addCorrectObjectPickID("obj1", appObjects);
        expect(appObjects.submitWarning).toHaveBeenCalled();
    });
});
//# sourceMappingURL=addCorrectObjectPickID.test.js.map