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