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 {SessionHandShake} from "../../../dist/hdc/message/SessionHandShake.js" 18 19describe('SessionHandShake Test', ()=> { 20 let sessionHandShake = new SessionHandShake(); 21 it('SessionHandShakeTest01', function () { 22 expect(sessionHandShake).not.toBeUndefined() 23 }); 24 25 it('SessionHandShakeTest02', function () { 26 expect(sessionHandShake.banner).toBeUndefined() 27 }); 28 29 it('SessionHandShakeTest03', function () { 30 sessionHandShake.banner = true 31 expect(sessionHandShake.banner).toBeTruthy() 32 }); 33 34 it('SessionHandShakeTest04', function () { 35 expect(sessionHandShake.authType).toBeUndefined() 36 }); 37 38 it('SessionHandShakeTest05', function () { 39 sessionHandShake.authType = true 40 expect(sessionHandShake.authType).toBeTruthy() 41 }); 42 43 it('SessionHandShakeTest06', function () { 44 expect(sessionHandShake.sessionId).toBeUndefined() 45 }); 46 47 it('SessionHandShakeTest07', function () { 48 sessionHandShake.sessionId = true 49 expect(sessionHandShake.sessionId).toBeTruthy() 50 }); 51 52 it('SessionHandShakeTest08', function () { 53 expect(sessionHandShake.connectKey).toBeUndefined() 54 }); 55 56 it('SessionHandShakeTest9', function () { 57 sessionHandShake.connectKey = true 58 expect(sessionHandShake.connectKey).toBeTruthy() 59 }); 60 61 it('SessionHandShakeTest10', function () { 62 expect(sessionHandShake.buf).toBeUndefined() 63 }); 64 65 it('SessionHandShakeTest11', function () { 66 sessionHandShake.buf = true; 67 expect(sessionHandShake.buf).toBeTruthy() 68 }); 69 70 it('SessionHandShakeTest12', function () { 71 expect(sessionHandShake.version).toBe("") 72 }); 73 74 it('SessionHandShakeTest13', function () { 75 sessionHandShake.version = true; 76 expect(sessionHandShake.version).toBeTruthy() 77 }); 78 79 it('SessionHandShakeTest14', function () { 80 expect(sessionHandShake.toString()).toBeTruthy() 81 }); 82})