• 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.layout.chartview.ProfilerChartsView;
19 import ohos.devtools.views.layout.chartview.TaskScenePanelChart;
20 import org.junit.Assert;
21 import org.junit.Before;
22 import org.junit.Test;
23 
24 /**
25  * Filled Line Chart Test
26  *
27  * @since 2021/2/1 9:31
28  */
29 public class FilledLineChartTest {
30     private ProfilerChartsView profilerChartsView;
31 
32     private FilledLineChart filledLineChart;
33 
34     /**
35      * functional test
36      *
37      * @tc.name: getFilledLineChart
38      * @tc.number: OHOS_JAVA_View_FilledLineChart_getFilledLineChart_0001
39      * @tc.desc: getFilledLineChart
40      * @tc.type: functional testing
41      * @tc.require: AR000FK5UI
42      */
43     @Before
getFilledLineChart()44     public void getFilledLineChart() {
45         profilerChartsView = new ProfilerChartsView(39999, true, new TaskScenePanelChart());
46         filledLineChart = new FilledLineChart(profilerChartsView, "", true);
47         Assert.assertNotNull(filledLineChart);
48     }
49 
50     /**
51      * functional test
52      *
53      * @tc.name: paintComponent
54      * @tc.number: OHOS_JAVA_View_FilledLineChart_paintComponent_0001
55      * @tc.desc: paintComponent
56      * @tc.type: functional testing
57      * @tc.require: AR000FK5UI
58      */
59     @Test
paintComponentTest()60     public void paintComponentTest() {
61         filledLineChart.revalidate();
62     }
63 }