Add Test cases for app shortcut, managedapps
[profile/tv/apps/dotnet/home.git] / HomeUnitTest / ManagedAppsTestCases.cs
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://floralicense.org/license/
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using Microsoft.VisualStudio.TestTools.UnitTesting;
18 using LibTVRefCommonPortable.Models;
19
20 namespace HomeUnitTest
21 {
22     /// <summary>
23     /// A Test cases for ManagedApps class.
24     /// </summary>
25     [TestClass]
26     public class ManagedAppsTestCases
27     {
28         /// <summary>
29         /// TVHome package ID
30         /// </summary>
31         private static readonly string Home = "org.tizen.xahome";
32
33         /// <summary>
34         /// TVApps package ID
35         /// </summary>
36         private static readonly string Apps = "org.tizen.xaapps";
37
38         /// <summary>
39         /// Mediahub package ID
40         /// </summary>
41         private static readonly string Mediahub = "org.tizen.xamediahub";
42
43         /// <summary>
44         /// Settings package ID
45         /// </summary>
46         private static readonly string Settings = "org.tizen.settings";
47
48         [TestMethod]
49         public void ManagerAppsIsHiddenRecentAppTest()
50         {
51             Assert.IsTrue(ManagedApps.IsHiddenRecentApp(Home), "TVHome should not be hidden in Recents");
52             Assert.IsTrue(ManagedApps.IsHiddenRecentApp(Apps), "Apps should not be hidden in Recents");
53             Assert.IsTrue(ManagedApps.IsHiddenRecentApp(Mediahub), "Mediahub should not be hidden in Recents");
54             Assert.IsTrue(ManagedApps.IsHiddenRecentApp(Settings), "Settings should not be hidden in Recents");
55         }
56
57         [TestMethod]
58         public void ManagerAppsIsNonPinnableAppsTest()
59         {
60             Assert.IsTrue(ManagedApps.IsNonPinnableApps(Home), "TVHome should not be pinned");
61             Assert.IsTrue(ManagedApps.IsNonPinnableApps(Apps), "Apps should not be pinned");
62             Assert.IsTrue(ManagedApps.IsNonPinnableApps(Mediahub), "Mediahub should not be pinned");
63             Assert.IsTrue(ManagedApps.IsNonPinnableApps(Settings), "Settings should not be pinned");
64         }
65     }
66 }