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 16import { PayloadProtect } from '../../../src/hdc/message/PayloadProtect'; 17 18describe('PayloadProtect Test', () => { 19 let payloadProtect = new PayloadProtect(); 20 it('PayloadProtectTest01', function () { 21 expect(payloadProtect).not.toBeUndefined(); 22 }); 23 24 it('PayloadProtectTest02', function () { 25 expect(payloadProtect.channelId).toBeUndefined(); 26 }); 27 28 it('PayloadProtectTest03', function () { 29 payloadProtect.channelId = true; 30 expect(payloadProtect.channelId).toBeTruthy(); 31 }); 32 33 it('PayloadProtectTest04', function () { 34 expect(payloadProtect.commandFlag).toBeUndefined(); 35 }); 36 37 it('PayloadProtectTest05', function () { 38 payloadProtect.commandFlag = true; 39 expect(payloadProtect.commandFlag).toBeTruthy(); 40 }); 41 42 it('PayloadProtectTest06', function () { 43 expect(payloadProtect.checkSum).toBeUndefined(); 44 }); 45 46 it('PayloadProtectTest07', function () { 47 payloadProtect.checkSum = true; 48 expect(payloadProtect.checkSum).toBeTruthy(); 49 }); 50 51 it('PayloadProtectTest08', function () { 52 expect(payloadProtect.vCode).toBeUndefined(); 53 }); 54 55 it('PayloadProtectTest9', function () { 56 payloadProtect.vCode = true; 57 expect(payloadProtect.vCode).toBeTruthy(); 58 }); 59 60 it('PayloadProtectTest10', function () { 61 expect(payloadProtect.toString()).toBeTruthy(); 62 }); 63}); 64