-/*
+/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
namespace ElmSharp.Tests
{
-
[TestFixture]
[Description("Testing ElmSharp.FloatingButton class")]
public class TSFloatingButton
[SetUp]
public static void Init()
{
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
- _floatingButton = new FloatingButton(_window);
-
+ if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) == 0)
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
+ _floatingButton = new FloatingButton(_window);
+ }
+ else
+ {
+ Assert.Pass("Not supported");
+ }
}
[TearDown]
_floatingButton = null;
}
}
+
private static void CreateFloatingButton()
{
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Init");
using System;
using ElmSharp.Accessible;
-namespace ElmSharp.Tests {
-
+namespace ElmSharp.Tests
+{
[TestFixture]
[Description("ElmSharp.Accessible.AccessibleObject Tests")]
public class AccessibleObjectTests : AccessibleObject
protected override IntPtr CreateHandle(EvasObject parent)
{
- return IntPtr.Zero;
+ var label = new Label(parent);
+ return label.Handle;
}
[SetUp]
public static void Init()
{
- LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Preconditions for each TEST");
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
}
[TearDown]
public static void Destroy()
{
- LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST");
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST");
_accessibleObjectTests = null;
}
Assert.Fail("SetContent should not throw exception: " + ex.ToString());
}
}
-
}
}
using System.Collections.Generic;
using ElmSharpForTizen.Tizen;
-
-namespace ElmSharp.Tests {
-
+namespace ElmSharp.Tests
+{
[TestFixture]
[Description("ElmSharp.Container Tests")]
- public class ContainerTests {
+ public class ContainerTests
+ {
private static Container _container;
private static MyContainer _myContainer;
private static MainWindow _window = MainWindow.GetInstance();
protected override IntPtr CreateHandle(EvasObject parent)
{
- return IntPtr.Zero;
+ var layout = new Layout(parent);
+ return layout.Handle;
}
}
[SetUp]
public static void Init()
{
- LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Preconditions for each TEST");
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
_myContainer = new MyContainer(_window);
}
[TearDown]
public static void Destroy()
{
- LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST");
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST");
if (_container != null)
{
_container.Unrealize();
[Test]
[Category("P1")]
- [Description("Check GetTextBlockGeometryByLineNumber method")]
- [Property("SPEC", "ElmSharp.EvasObject.GetTextBlockGeometryByLineNumber M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Qian Sui, qian.sui@samsung.com")]
- public void GetTextBlockGeometryByLineNumber_CHECK_METHOD()
- {
- int x, y, w, h;
- var mark = _evasObject.GetTextBlockGeometryByLineNumber(1, out x, out y, out w, out h);
- Assert.IsInstanceOf<Boolean>(mark);
- }
-
- [Test]
- [Category("P1")]
[Description("Check whether get value of EvasCanvas are identical with the set value or not.")]
[Property("SPEC", "ElmSharp.EvasObject.EvasCanvas A")]
[Property("SPEC_URL", "-")]
-/*
+/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
using System;
using ElmSharpForTizen.Tizen;
-
namespace ElmSharp.Tests
{
-
[TestFixture]
[Description("Testing ElmSharp.FloatingButton class")]
public class FloatingButtonTests
{
-
private static FloatingButton _floatingButton;
private static MainWindow _window = MainWindow.GetInstance();
[SetUp]
public static void Init()
{
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
- _floatingButton = new FloatingButton(_window);
+ if (ElmSharpProfile.GetProfile().CompareTo(ElmSharpProfile.MobileProfile) == 0)
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");
+ _floatingButton = new FloatingButton(_window);
+ }
+ else
+ {
+ Assert.Pass("Not supported");
+ }
}
[TearDown]
{
try
{
- _floatingButton.SetPosition(FloatingButtonPosition.Left,true);
+ _floatingButton.SetPosition(FloatingButtonPosition.Left, true);
}
catch (Exception)
{