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 #include <gtest/gtest.h>
17 #include "system_time.h"
18
19 using namespace testing::ext;
20 using namespace OHOS;
21 using namespace OHOS::AAFwk;
22
23 namespace OHOS {
24 namespace AAFwk {
25 namespace {
26 } // namespace
27
28 class SystemTimeTest : public testing::Test {
29 public:
30 static void SetUpTestCase();
31 static void TearDownTestCase();
32 void SetUp();
33 void TearDown();
34 };
35
SetUpTestCase()36 void SystemTimeTest::SetUpTestCase()
37 {}
38
TearDownTestCase()39 void SystemTimeTest::TearDownTestCase()
40 {}
41
SetUp()42 void SystemTimeTest::SetUp()
43 {}
44
TearDown()45 void SystemTimeTest::TearDown()
46 {}
47
48 /**
49 * @tc.name: System_Time_Get_Now_System_0100
50 * @tc.desc: "Get System Time" test.
51 * @tc.type: FUNC
52 */
HWTEST_F(SystemTimeTest, System_Time_Get_Now_System_0100, TestSize.Level1)53 HWTEST_F(SystemTimeTest, System_Time_Get_Now_System_0100, TestSize.Level1)
54 {
55 SystemTime systemTime;
56 EXPECT_GT(systemTime.GetNowSysTime(), 0);
57 }
58 } // namespace AAFwk
59 } // namespace OHOS
60