• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 package ohos.devtools.views.charts;
17 
18 import ohos.devtools.views.common.LayoutConstants;
19 import ohos.devtools.views.layout.chartview.ProfilerChartsView;
20 import ohos.devtools.views.layout.chartview.TaskScenePanelChart;
21 import org.junit.Assert;
22 import org.junit.Before;
23 import org.junit.Test;
24 
25 /**
26  * Rect Chart Test
27  *
28  * @since 2021/5/19 16:39
29  */
30 public class RectChartTest {
31     private static final String NAME = "Test";
32     private static final int TEST_START = 0;
33     private static final int TEST_END = 1000;
34 
35     private ProfilerChartsView view;
36 
37     /**
38      * init
39      *
40      * @tc.name: init
41      * @tc.number: OHOS_JAVA_View_RectChart_init_0001
42      * @tc.desc: init
43      * @tc.type: functional testing
44      * @tc.require: AR000FK5UI
45      */
46     @Before
init()47     public void init() {
48         initView();
49     }
50 
initView()51     private void initView() {
52         view = new ProfilerChartsView(LayoutConstants.NUM_L, true, new TaskScenePanelChart());
53         view.getPublisher().getStandard().updateDisplayTimeRange(TEST_START, TEST_END);
54     }
55 
56     /**
57      * Rect Chart Test
58      *
59      * @tc.name: RectChartTest
60      * @tc.number: OHOS_JAVA_View_RectChart_RectChartTest_0001
61      * @tc.desc: Rect Chart Test
62      * @tc.type: functional testing
63      * @tc.require: AR000FK5UI
64      */
65     @Test
rectChartTest()66     public void rectChartTest() {
67         RectChart chart = new RectChart(view, NAME);
68         Assert.assertNotNull(chart);
69     }
70 }