import { makeAppObjectRepo } from "@vived/core";
import { makeHoverLabelEntity } from "../Entities/HoverLabelEntity";
import { makeToggleAllowHoverLabel } from "../UseCases/ToggleAllowHoverLabel";
import { toggleAllowHoverLabel } from "./toggleAllowHoverLabel";
function makeTestRig() {
    const appObjects = makeAppObjectRepo();
    const hoverLabelAO = appObjects.getOrCreate("HoverLabel");
    makeHoverLabelEntity(hoverLabelAO);
    const toggleHoverLabelUC = makeToggleAllowHoverLabel(hoverLabelAO);
    const mockToggleAllowHoverLabel = jest.fn();
    toggleHoverLabelUC.toggleAllowHoverLabel = mockToggleAllowHoverLabel;
    return { appObjects, mockToggleAllowHoverLabel };
}
describe("Toggle Allow Hover Label Controller", () => {
    it("Submits warning if ToggleAllowHoverLabelUC App Object was not setup", () => {
        const appObjects = makeAppObjectRepo();
        appObjects.submitWarning = jest.fn();
        toggleAllowHoverLabel(appObjects);
        expect(appObjects.submitWarning).toHaveBeenCalledWith("ToggleAllowHoverLabelController", "ToggleAllowHoverLabelUC not found.");
    });
    it("Calls toggle allow hover label", () => {
        const { appObjects, mockToggleAllowHoverLabel } = makeTestRig();
        toggleAllowHoverLabel(appObjects);
        expect(mockToggleAllowHoverLabel).toHaveBeenCalled();
    });
});
//# sourceMappingURL=toggleAllowHoverLabel.test.js.map