"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const LabelDropItemEntity_1 = require("../Entities/LabelDropItemEntity");
const labelDropLabelValidator_1 = require("./labelDropLabelValidator");
describe("Label Drop Label Validator", () => {
    it("Returns a label validation message if the label is empty", () => {
        expect((0, labelDropLabelValidator_1.labelDropLabelValidator)("")).toEqual(LabelDropItemEntity_1.LabelDropItemEntity.LABEL_DROP_EMPTY);
    });
    it("Returns a label validation message if the label is longer than 40", () => {
        let lbl = "X";
        for (let index = 0; index < 40; index++) {
            lbl = lbl + "X";
        }
        expect(lbl.length).toEqual(41);
        expect((0, labelDropLabelValidator_1.labelDropLabelValidator)(lbl)).toEqual(LabelDropItemEntity_1.LabelDropItemEntity.LABEL_DROP_TOO_LONG);
    });
    it("Null when good", () => {
        const lbl = "X";
        expect((0, labelDropLabelValidator_1.labelDropLabelValidator)(lbl)).toBeNull();
    });
});
//# sourceMappingURL=labelDropLabelValidator.test.js.map