• 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  * Test class of Chart-related tool classes
27  *
28  * @since 2021/2/1 9:31
29  */
30 public class LineChartTest {
31     /**
32      * ProfilerChartsView
33      */
34     private ProfilerChartsView view;
35     private LineChart lineC;
36 
37     /**
38      * functional testing
39      *
40      * @tc.name: init
41      * @tc.number: OHOS_JAVA_View_LineChart_init_0001
42      * @tc.desc: init
43      * @tc.type: functional testing
44      * @tc.require: AR000FK5UI
45      */
46     @Before
init()47     public void init() {
48         view = new ProfilerChartsView(LayoutConstants.NUM_L, true, new TaskScenePanelChart());
49         lineC = new LineChart(view, "");
50     }
51 
52     /**
53      * functional testing
54      *
55      * @tc.name: LineChartTest
56      * @tc.number: OHOS_JAVA_View_LineChart_LineChartTest_0001
57      * @tc.desc: LineChartTest
58      * @tc.type: functional testing
59      * @tc.require: AR000FK5UI
60      */
61     @Test
lineChartTest()62     public void lineChartTest() {
63         LineChart lineChart = new LineChart(view, "");
64         Assert.assertNotNull(lineChart);
65     }
66 }
67