"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@vived/core");
const HoverLabelEntity_1 = require("../Entities/HoverLabelEntity");
const ToggleAllowHoverLabel_1 = require("../UseCases/ToggleAllowHoverLabel");
const toggleAllowHoverLabel_1 = require("./toggleAllowHoverLabel");
function makeTestRig() {
    const appObjects = (0, core_1.makeAppObjectRepo)();
    const hoverLabelAO = appObjects.getOrCreate("HoverLabel");
    (0, HoverLabelEntity_1.makeHoverLabelEntity)(hoverLabelAO);
    const toggleHoverLabelUC = (0, ToggleAllowHoverLabel_1.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 = (0, core_1.makeAppObjectRepo)();
        appObjects.submitWarning = jest.fn();
        (0, toggleAllowHoverLabel_1.toggleAllowHoverLabel)(appObjects);
        expect(appObjects.submitWarning).toHaveBeenCalledWith("ToggleAllowHoverLabelController", "ToggleAllowHoverLabelUC not found.");
    });
    it("Calls toggle allow hover label", () => {
        const { appObjects, mockToggleAllowHoverLabel } = makeTestRig();
        (0, toggleAllowHoverLabel_1.toggleAllowHoverLabel)(appObjects);
        expect(mockToggleAllowHoverLabel).toHaveBeenCalled();
    });
});
//# sourceMappingURL=toggleAllowHoverLabel.test.js.map