private const string TAG = "Components";
private bool _stateChangedEvent = false;
private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
- private static bool _flagOnThemeChangedEvent = false;
[SetUp]
public void Init()
}
}
- [Test]
- [Category("P1")]
- [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")]
- [Property("SPEC", "Tizen.NUI.Components.Button.OnThemeChangedEvent M")]
- [Property("SPEC_URL", " - ")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
- public void OnThemeChangedEvent_CHECK_RETURN_VALUE()
- {
- try
- {
- _flagOnThemeChangedEvent = false;
- StyleManager.Instance.Theme = "Family";
- var button = new Button();
- StyleManager.Instance.Theme = "Food";
- Assert.IsNotNull(button, "Should be not null");
- Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!");
- }
- catch (Exception e)
- {
- Assert.Fail("Caught Exception" + e.ToString());
- }
- }
-
[Test]
[Category("P1")]
[Description("Test Button's icon part. Check whether null or not")]
{
return base.CreateViewStyle();
}
-
- protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
- {
- _flagOnThemeChangedEvent = true;
- }
}
public class DefaultButtonStyle : StyleBase
private const string TAG = "Components";
private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
private string _path = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
- private static bool _flagOnThemeChangedEvent = false;
[SetUp]
public void Init()
}
}
- [Test]
- [Category("P1")]
- [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")]
- [Property("SPEC", "Tizen.NUI.Components.Popup.OnThemeChangedEvent M")]
- [Property("SPEC_URL", " - ")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
- public void OnThemeChangedEvent_CHECK_RETURN_VALUE()
- {
- try
- {
- _flagOnThemeChangedEvent = false;
- StyleManager.Instance.Theme = "Family";
- var popup = new MyPopup();
- StyleManager.Instance.Theme = "Food";
- Assert.IsNotNull(popup, "Should be not null");
- Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!");
- }
- catch (Exception e)
- {
- Assert.Fail("Caught Exception" + e.ToString());
- }
- }
-
public class MyPopup : Popup
{
public MyPopup() : base() {}\r
{
return base.CreateViewStyle();
}
-
- protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
- {
- _flagOnThemeChangedEvent = true;
- }
}
public class DefaultPopupStyle : StyleBase
{
private const string TAG = "Components";
private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "Tizen.NUI.Components.Tests.png";
- private static bool _flagOnThemeChangedEvent = false;
[SetUp]
public void Init()
}
}
- [Test]
- [Category("P1")]
- [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")]
- [Property("SPEC", "Tizen.NUI.Components.Progress.OnThemeChangedEvent M")]
- [Property("SPEC_URL", " - ")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
- public void OnThemeChangedEvent_CHECK_RETURN_VALUE()
- {
- try
- {
- _flagOnThemeChangedEvent = false;
- StyleManager.Instance.Theme = "Family";
- var progress = new MyProgress();
- StyleManager.Instance.Theme = "Food";
- Assert.IsNotNull(progress, "Should be not null");
- Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!");
- }
- catch (Exception e)
- {
- Assert.Fail("Caught Exception" + e.ToString());
- }
- }
-
public class MyProgress : Progress
{
public MyProgress() : base()
{
base.ChangeImageState(statusType);
}
-
- protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
- {
- _flagOnThemeChangedEvent = true;
- }
}
public class DefaultProgressStyle : StyleBase
{
private const string TAG = "TCT";
private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
- private static bool _flagOnThemeChangedEvent = false;
public SliderTests()
{
}
}
- [Test]
- [Category("P1")]
- [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")]
- [Property("SPEC", "Tizen.NUI.Components.Slider.OnThemeChangedEvent M")]
- [Property("SPEC_URL", " - ")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
- public void OnThemeChangedEvent_CHECK_RETURN_VALUE()
- {
- try
- {
- _flagOnThemeChangedEvent = false;
- StyleManager.Instance.Theme = "Family";
- var slider = new Slider();
- StyleManager.Instance.Theme = "Food";
- Assert.IsNotNull(slider, "Should be not null");
- Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!");
- }
- catch (Exception e)
- {
- Assert.Fail("Caught Exception" + e.ToString());
- }
- }
-
public class MySlider : Slider
{
public MySlider() : base() {}\r
public ViewStyle CreateMyViewStyle()\r
{\r
return base.CreateViewStyle();\r
- }\r
-
- protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
- {
- _flagOnThemeChangedEvent = true;
}
}
{
private const string TAG = "Components";
private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
- private static bool _flagOnThemeChangedEvent = false;
[SetUp]
public void Init()
}
}
- [Test]
- [Category("P1")]
- [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")]
- [Property("SPEC", "Tizen.NUI.Components.Switch.OnThemeChangedEvent M")]
- [Property("SPEC_URL", " - ")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
- public void OnThemeChangedEvent_CHECK_RETURN_VALUE()
- {
- try
- {
- _flagOnThemeChangedEvent = false;
- StyleManager.Instance.Theme = "Family";
- var _switch = new Switch();
- StyleManager.Instance.Theme = "Food";
- Assert.IsNotNull(_switch, "Should be not null");
- Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!");
- }
- catch (Exception e)
- {
- Assert.Fail("Caught Exception" + e.ToString());
- }
- }
-
[Test]
[Category("P1")]
[Description("Test Switch's track part. Check whether null or not")]
{
return base.CreateViewStyle();
}
-
- protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
- {
- _flagOnThemeChangedEvent = true;
- }
}
public class DefaultSwitchStyle : StyleBase
{
private const string TAG = "Components";
private bool _checkValue;
- private static bool _flagOnThemeChangedEvent = true;
[SetUp]
public void Init()
}
}
- [Test]
- [Category("P1")]
- [Description("Test OnThemeChangedEvent. Check whether OnThemeChangedEvent works or not.")]
- [Property("SPEC", "Tizen.NUI.Components.Tab.OnThemeChangedEvent M")]
- [Property("SPEC_URL", " - ")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
- public void OnThemeChangedEvent_CHECK_RETURN_VALUE()
- {
- try
- {
- _flagOnThemeChangedEvent = false;
- StyleManager.Instance.Theme = "Family";
- var tab = new Tab();
- StyleManager.Instance.Theme = "Food";
- Assert.IsNotNull(tab, "Should be not null");
- Assert.IsTrue(_flagOnThemeChangedEvent, "Should be true!");
- }
- catch (Exception e)
- {
- Assert.Fail("Caught Exception" + e.ToString());
- }
- }
-
public class MyTab : Tab
{
public bool flagOnUpdate = false;
flagOnUpdate = true;
}
- protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
- {
- _flagOnThemeChangedEvent = true;
- }
-
protected override void LayoutChild()
{
base.LayoutChild();