Esempio n. 1
0
        public virtual void _IsEnabled()
        {
            //var propName = Test.VisualElement.IsEnabled.ToString ();
            var remote = new StateViewContainerRemote(App, Test.VisualElement.IsEnabled, PlatformViewType);

            remote.GoTo();

            var enabled = remote.GetProperty <bool>(View.IsEnabledProperty);

            Assert.IsTrue(enabled);

            remote.TapStateButton();

            enabled = remote.GetProperty <bool>(View.IsEnabledProperty);
            Assert.IsFalse(enabled);

            remote.TapStateButton();

            var isEnabled = remote.GetStateLabel().ReadText();

            Assert.AreEqual("True", isEnabled);

            remote.TapStateButton();

            var isDisabled = remote.GetStateLabel().ReadText();

            Assert.AreEqual("False", isDisabled);
        }
Esempio n. 2
0
        public virtual void _IsVisible()
        {
            var remote = new StateViewContainerRemote(App, Test.VisualElement.IsVisible, PlatformViewType);

            remote.GoTo();

            var viewPre = remote.GetViews();

            Assert.AreEqual(1, viewPre.Length);

            remote.TapStateButton();

            var viewPost = remote.GetViews();

            Assert.AreEqual(0, viewPost.Length);
        }
Esempio n. 3
0
		public virtual void _IsEnabled ()
		{
			//var propName = Test.VisualElement.IsEnabled.ToString ();
			var remote = new StateViewContainerRemote (App, Test.VisualElement.IsEnabled, PlatformViewType);
			remote.GoTo ();

			var enabled = remote.GetProperty<bool> (View.IsEnabledProperty);
			Assert.IsTrue (enabled);

			remote.TapStateButton ();

			enabled = remote.GetProperty<bool> (View.IsEnabledProperty);
			Assert.IsFalse (enabled);

			remote.TapStateButton ();

			var isEnabled = remote.GetStateLabel ().Text;
			Assert.AreEqual ("True", isEnabled);

			remote.TapStateButton ();

			var isDisabled = remote.GetStateLabel ().Text;
			Assert.AreEqual ("False", isDisabled);
		}
Esempio n. 4
0
		public virtual void _IsVisible ()
		{
			var remote = new StateViewContainerRemote (App, Test.VisualElement.IsVisible, PlatformViewType);
			remote.GoTo ();

			var viewPre = remote.GetViews ();

			Assert.AreEqual (1, viewPre.Length);

			remote.TapStateButton ();

			var viewPost = remote.GetViews ();
	
			Assert.AreEqual (0, viewPost.Length);
		}