Console.Out.WriteLine("App ID : " + app.AppID);
Console.Out.WriteLine("Installed Date : " + app.Installed);
+ Assert.AreNotEqual(app.AppID, null,
+ "AppID is required!!!");
+
// Err : CurrentStateDescription should not be null
Assert.AreNotEqual(app.CurrentStateDescription, null,
- "StateDescription CurrentStateDescription is null!!!");
+ "CurrentStateDescription is null!!!");
+
+ // Err : type of Action should be the AppControlAction
+ Assert.IsTrue(app.CurrentStateDescription.Action is AppControlAction,
+ "AppShortcut's action should be AppControlAction!!!");
+
+ // Err : Action in CurrentStateDescription should not be null
+ Assert.AreNotEqual(app.CurrentStateDescription.Action, null,
+ "StateDescription should have Action!!!");
+
+ // Err : Label in CurrentStateDescription should not be null
+ Assert.AreNotEqual(app.CurrentStateDescription.Label, null,
+ "StateDescription should have Label!!!");
+
+ // Err : IconPath in CurrentStateDescription should not be null
+ Assert.AreNotEqual(app.CurrentStateDescription.IconPath, null,
+ "StateDescription should have App Icon!!!");
// Err : removable app property check
if (app.CurrentStateDescription.Label.Contains("removable") &&
app.IsRemovable == false)
{
- Assert.Fail("Removable is failed");
+ Assert.Fail("Setting Removable flag is wrong");
}
// Err : Invalid state description removing.
{
var recents = controller.GetList();
- // R : MAX number of recent = 10
+ // Req : MAX number of recent = 10
if (recents.Count() > 10)
{
Assert.Fail("Too many Recent!!!, Returned = " + recents.Count());
break;
}
- // R : Invalid Recent(id, label has 'invalid') should not included!!!
+ // Req : Invalid Recent(id, label has 'invalid') should not included!!!
if (recent.CurrentStateDescription == null ||
recent.CurrentStateDescription.Label.ToLower().Contains("invalid"))
{
}
}
- // R : Test Sample Recent is consist of App and Media types.
+ // Err : Test Sample Recents are consist of App and Media types both.
if (isAllMedias || isAllApps)
{
Assert.Fail("Invalid Recent list, All Media({0}), All Apps({1})", isAllMedias, isAllApps);
var defaultStateDescription = new StateDescription()
{
- Label = item.Applabel,
- IconPath = item.IconPath,
+ Label = item.Applabel ?? "No Name",
+ IconPath = item.IconPath ?? DefaultAppIcon,
Action = new AppControlAction()
{
AppID = item.AppID,
/// <returns>If the application isn't pinnable return 'true'</returns>
public static bool IsNonPinnableApps(string appID)
{
+ if (appID == null)
+ {
+ return true;
+ }
+
if (appID.CompareTo(TVHomeAppID) == 0 ||
appID.CompareTo(TVAppsAppID) == 0 ||
appID.CompareTo(MediaHubAppID) == 0 ||
/// <returns>If the application have to be hidden, return 'true'</returns>
public static bool IsHiddenRecentApp(string appID)
{
+ if (appID == null)
+ {
+ return true;
+ }
+
if (appID.CompareTo(TVHomeAppID) == 0 ||
appID.CompareTo(TVAppsAppID) == 0 ||
appID.CompareTo(MediaHubAppID) == 0 ||
installedApps.Add(new InstalledApp
{
+ Applabel = "invalid.app3.noid",
+ IconPath = "path/app3",
+ InstalledTime = new DateTime(2017, 05, 02),
+ });
+
+ installedApps.Add(new InstalledApp
+ {
+ Applabel = "app4.noicon",
+ AppID = "app4.noicon",
+ InstalledTime = new DateTime(2017, 05, 02),
+ });
+
+ installedApps.Add(new InstalledApp
+ {
+ Applabel = "app5.nolabel",
+ AppID = "app5.nolabel",
+ IconPath = "path/app5",
+ InstalledTime = new DateTime(2017, 05, 02),
+ });
+
+ installedApps.Add(new InstalledApp
+ {
Applabel = "invalid.org.tizen.xahome",
AppID = "org.tizen.xahome",
IconPath = "path/app3",