1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16// @ts-ignore 17import {TransferPayload} from "../../../dist/hdc/message/TransferPayload.js"; 18 19describe('TransferPayload Test', ()=> { 20 let transferPayload = new TransferPayload(); 21 it('TransferPayloadTest01', function () { 22 expect(transferPayload).not.toBeUndefined() 23 }); 24 25 it('TransferPayloadTest02', function () { 26 expect(transferPayload.index).toBeUndefined() 27 }); 28 29 it('TransferPayloadTest03', function () { 30 transferPayload.index = true; 31 expect(transferPayload.index).toBeTruthy() 32 }); 33 34 it('TransferPayloadTest04', function () { 35 expect(transferPayload.compressType).toBeUndefined() 36 }); 37 38 it('TransferPayloadTest05', function () { 39 transferPayload.compressType = true; 40 expect(transferPayload.compressType).toBeTruthy() 41 }); 42 43 it('TransferPayloadTest06', function () { 44 expect(transferPayload.compressSize).toBeUndefined() 45 }); 46 47 it('TransferPayloadTest07', function () { 48 transferPayload.compressSize = true; 49 expect(transferPayload.compressSize).toBeTruthy() 50 }); 51 52 it('TransferPayloadTest08', function () { 53 expect(transferPayload.uncompressSize).toBeFalsy() 54 }); 55 56 it('TransferPayloadTest09', function () { 57 transferPayload.uncompressSize = true; 58 expect(transferPayload.uncompressSize).toBeTruthy() 59 }); 60 61 it('TransferPayloadTest10', function () { 62 expect(transferPayload.toString()).not.toBeUndefined() 63 }); 64})