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 {ClientContainer, SettingRegistry} from "../../../dist/trace/grpc/ProfilerController.js" 18 19describe('HiProfilerClient Test', ()=>{ 20 21 let profilerController= new ClientContainer(); 22 23 it('ProfilerClientTest01', function () { 24 expect(profilerController.port).toBeUndefined(); 25 }); 26 27 it('ProfilerClientTest02', function () { 28 profilerController.port = true; 29 expect(profilerController.port).toBeTruthy(); 30 }); 31 32 it('ProfilerClientTest03', function () { 33 expect(profilerController.host).toBeUndefined(); 34 }); 35 36 it('ProfilerClientTest04', function () { 37 profilerController.host = true; 38 expect(profilerController.host).toBeTruthy(); 39 }); 40 41 it('ProfilerClientTest06', function () { 42 profilerController.loadSettings = jest.fn(()=>true) 43 expect(profilerController.start()).toBeUndefined(); 44 }); 45 46 it('ProfilerClientTest07', function () { 47 profilerController.loadSettings = jest.fn(()=>true) 48 expect(profilerController.loadSettings()).toBeTruthy(); 49 }); 50 it('ProfilerClientTest08', function () { 51 expect(profilerController. registryClient()).toBeUndefined() 52 }); 53 it('ProfilerClientTest09', function () { 54 expect(SettingRegistry. registry()).toBeUndefined() 55 }); 56})