import {MPosControllerLabelPrinter} from "../src/MPosControllerLabelPrinter";
import {Label_Status} from "../src/dataType/Label_Status";
import {APIResponse} from "../src/dataType/APIResponse";
import {BitmapFontSelection} from "../src/dataType/Label_BitmapFontSelection";
import {Label_Rotation} from "../src/dataType/Label_Rotation";
import {Label_Alignment} from "../src/dataType/Label_Alignment";
import {Label_Vector_Font} from "../src/dataType/Label_Vector_Font";
import {Label_BarcodeType} from "../src/dataType/Label_BarcodeType";
import {Label_Barcode_Text} from "../src/dataType/Label_Barcode_Text";
import {Label_MaxiCodeMode} from "../src/dataType/Label_MaxiCodeMode";
import {Label_PDF417_ECC} from "../src/dataType/Label_PDF417_ECC";
import {Label_DataCompression} from "../src/dataType/Label_DataCompression";
import {Label_PDF417HRI} from "../src/dataType/Label_PDF417HRI";
import {Label_PDF417BarcodeOrigin} from "../src/dataType/Label_PDF417BarcodeOrigin";
import {Label_QRCode_Model} from "../src/dataType/Label_QRCode_Model";
import {Label_EccLevel} from "../src/dataType/Label_EccLevel";
import {Label_Code49_HRI} from "../src/dataType/Label_Code49_HRI";
import {Label_Code49_StartingMode} from "../src/dataType/Label_Code49_StartingMode";
import {Label_CodaBlock_Mode} from "../src/dataType/Label_CodaBlock_Mode";
import {Label_CheckDigitSelection} from "../src/dataType/Label_CheckDigitSelection";
import {Label_MSI_HRI} from "../src/dataType/Label_MSI_HRI";
import {Label_Plessey_HRI} from "../src/dataType/Label_Plessey_HRI";
import {Label_RSS_BarcodeType} from "../src/dataType/Label_RSS_BarcodeType";
import {Label_drawBlock_Option} from "../src/dataType/Label_drawBlock_Option";
import {Label_Circle_Size} from "../src/dataType/Label_Circle_Size";
import {Label_DitheringType} from "../src/dataType/Label_DitheringType";
import {Label_CompressType} from "../src/dataType/Label_CompressType";
import {Label_CharacterSet} from "../src/dataType/Label_CharacterSet";
import {Label_InternationalCharset} from "../src/dataType/Label_InternationalCharset";
import {Label_PrintingType} from "../src/dataType/Label_PrintingType";
import {Label_MediaType} from "../src/dataType/Label_MediaType";
import {Label_Orientation} from "../src/dataType/Label_Orientation";
import {Label_RFID_Type} from "../src/dataType/Label_RFID_Type";
import {Label_RFID_DataType} from "../src/dataType/Label_RFID_DataType";
import {Label_Statistics_Data} from "../src/dataType/Label_Statistics_Data";


test('TEST_checkPrinterStatus',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.checkPrinterStatus().then(status => {
        expect(status).toBe(Label_Status.Fail);
    });
});

test('TEST_printBuffer',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.printBuffer(1).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawTextDeviceFont',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawTextDeviceFont(
        "",1,1,BitmapFontSelection.FONT_8PT, 1,1,1,Label_Rotation.None, false,false,false,Label_Alignment.Alignment_Left
        ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawTextVectorFont',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawTextVectorFont(
        "",1,1,Label_Vector_Font.ASCII, 1,1,1,Label_Rotation.None, false,false,false,false,Label_Alignment.Alignment_Left
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcode1D',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcode1D(
        "",1,1,Label_BarcodeType.COD128, 1,1,1,Label_Barcode_Text.Below, 1,Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodeMaxiCode',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeMaxiCode(
        "",1,1,Label_MaxiCodeMode.Mode_2
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodePDF417',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodePDF417(
        "",1,1,5,1,Label_PDF417_ECC.ECC_0, Label_DataCompression.Numeric, Label_PDF417HRI.None, Label_PDF417BarcodeOrigin.Center, 2,5,Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodeQRCode',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeQRCode(
        "",1,1,1,Label_QRCode_Model.Model_1, Label_EccLevel.Label_ECC_L, Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodeDataMatrix',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeDataMatrix(
        "",1,1,1,false,Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodeAztec',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeAztec(
        "",1,1,1,false,1,true,3,"",Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});


test('TEST_drawBarcodeCode49',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeCode49(
        "",1,1,1,1,1,Label_Code49_HRI.None,Label_Code49_StartingMode.Automatic_Mode,Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodeCodaBlock',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeCodaBlock(
        "",1,1,1,1,1,true,3,Label_CodaBlock_Mode.Mode_A, Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodeMicroPDF',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeMicroPDF(
        "",1,1,3,3,3,Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodeIMB',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeIMB(
        "",1,1,false,Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodeMSI',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeMSI(
        "",1,1,1,1,1,Label_CheckDigitSelection.None, false,Label_MSI_HRI.None, Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodePlessey',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodePlessey(
        "",1,1,1,1,1,false,Label_Plessey_HRI.None, Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodeTLC39',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeTLC39(
        "",1,1,1,1,1,1,1,Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBarcodeRSS',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBarcodeRSS(
        "",1,1,Label_RSS_BarcodeType.EAN_8,1,2,3,2,Label_Rotation.None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBlock',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBlock(
        1,1,1,1,Label_drawBlock_Option.Box,1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawCircle',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawCircle(
        1,1,1,1,Label_Circle_Size.Circle_40X40,1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawImageFile',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawImageFile(
        "",1,1,1,1,Label_DitheringType.None, Label_CompressType.Image_None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_drawBase64Image',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.drawBase64Image(
        "",1,1,1,1,Label_DitheringType.None, Label_CompressType.Image_None
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setCharacterset',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setCharacterset(
        Label_CharacterSet.Label_CodePage_CP737,Label_InternationalCharset.ICS_CHINA
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setPrintingType',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setPrintingType(
        Label_PrintingType.Thermal_Transfer
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setMargin',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setMargin(
        1,1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setLength',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setLength(
        1,1,Label_MediaType.Gap,1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setWidth',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setWidth(
        1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setSpeed',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setWidth(
        1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setDensity',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setDensity(
        1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setOrientation',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setOrientation(
        Label_Orientation.Top
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setOffset',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setOffset(
        1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setCuttingPosition',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setCuttingPosition(
        1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setAutoCutter',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setAutoCutter(
        true,1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setRewinder',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setRewinder(
        true
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setupRFID',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setupRFID(
        Label_RFID_Type.EPC_1, 1,1,3
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setEPCDataStructure',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setEPCDataStructure(
        1,""
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setRFIDPosition',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setRFIDPosition(
        1
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_calibrateRFID',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.calibrateRFID(

    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_writeRFID',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.writeRFID(
        Label_RFID_DataType.ASCII, 1,2,""
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_setRFIDPassword',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.setRFIDPassword(
        "","","",""
    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_lockRFID',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.lockRFID(

    ).then(response => {
        expect(response).toBe(APIResponse.Fail);
    });
});

test('TEST_getStatisticsData',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.getStatisticsData(
        Label_Statistics_Data.Cut_1
    ).then(response => {
        expect(response).toBe("");
    });
});

test('TEST_getPrinterDPI',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.getPrinterDPI(
    ).then(response => {
        expect(response).toBe(-1);
    });
});

test('TEST_getMaxWidth',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.getMaxWidth(
    ).then(response => {
        expect(response).toBe(-1);
    });
});

test('TEST_getSupportedSpeeds',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.getSupportedSpeeds(
    ).then(response => {
        expect(response).toStrictEqual(new Array());
    });
});

test('TEST_getModelName',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.getModelName(
    ).then(response => {
        expect(response).toBe("");
    });
});

test('TEST_getFirmwareVersion',async()=>{
    const printer = new MPosControllerLabelPrinter();

    return await printer.getFirmwareVersion(
    ).then(response => {
        expect(response).toBe("");
    });
});
