Esempio n. 1
0
        public void Font()
        {
            //TODO iOS
            var remote = new ViewContainerRemote(App, Test.Button.Font, PlatformViewType);

            remote.GoTo();

#if __ANDROID__
            var isBold = remote.GetProperty <bool>(FontElement.FontProperty);
            Assert.True(isBold);
#elif __MACOS__
            Assert.Inconclusive("needs testing");
#else
            var font = remote.GetProperty <Font>(FontElement.FontProperty);
            Assert.AreEqual(FontWeight.Bold, font.Weight);
#endif
        }
Esempio n. 2
0
        public void Font()
        {
            //TODO iOS
            var remote = new ViewContainerRemote(App, Test.Button.Font, PlatformViewType);

            remote.GoTo();

#if __ANDROID__
            var isBold = remote.GetProperty <bool> (Button.FontProperty);
            Assert.True(isBold);
#elif __MACOS__
            Assert.Inconclusive("needs testing");
#else
            var font = remote.GetProperty <Font>(Button.FontProperty);
            Assert.True(font.FontAttributes.HasFlag(FontAttributes.Bold));
#endif
        }
Esempio n. 3
0
        public void TextColor()
        {
            var remote = new ViewContainerRemote(App, Test.Button.TextColor, PlatformViewType);

            remote.GoTo();

            var buttonTextColor = remote.GetProperty <Color>(Button.TextColorProperty);

            Assert.AreEqual(Colors.Pink, buttonTextColor);
        }
Esempio n. 4
0
        public void Text()
        {
            var remote = new ViewContainerRemote(App, Test.Button.Text, PlatformViewType);

            remote.GoTo();

            var buttonText = remote.GetProperty <string>(Button.TextProperty);

            Assert.AreEqual("Text", buttonText);
        }
Esempio n. 5
0
        public virtual void _RotationY()
        {
            var remote = new ViewContainerRemote(App, Test.VisualElement.RotationY, PlatformViewType);

            remote.GoTo();

#if __ANDROID__
            var rotationY = remote.GetProperty <float>(View.RotationYProperty);
            Assert.AreEqual(10.0f, rotationY);
#endif
#if __IOS__
            var    rotationYMatrix = remote.GetProperty <Matrix>(View.RotationYProperty);
            Matrix matrix          = NumericExtensions.CalculateRotationMatrixForDegrees(10.0f, Axis.Y);
            Assert.AreEqual(matrix, rotationYMatrix);
#endif
#if WINDOWS
            Assert.Inconclusive(PleaseInspect);
#endif
        }
Esempio n. 6
0
        public void BorderWidth()
        {
            var remote = new ViewContainerRemote(App, Test.Button.BorderWidth, PlatformViewType);

            remote.GoTo();

#if __IOS__
            var borderWidth = remote.GetProperty <float>(Button.BorderWidthProperty);
            Assert.AreEqual(15.0f, borderWidth);
#endif
        }
Esempio n. 7
0
        public void BorderRadius()
        {
            var remote = new ViewContainerRemote(App, Test.Button.BorderRadius, PlatformViewType);

            remote.GoTo();

#if __IOS__
            var borderRadius = remote.GetProperty <float>(Button.CornerRadiusProperty);
            Assert.AreEqual(20.0f, borderRadius);
#endif
        }
        public void IsRunning()
        {
            var remote = new ViewContainerRemote(App, Test.ActivityIndicator.IsRunning, PlatformViewType);

            remote.GoTo();
#if __MACOS__
            Assert.Inconclusive("Not tested yet");
#elif __WINDOWS__
            Assert.Inconclusive(PleaseInspect);
#else
            var isRunning = remote.GetProperty <bool>(ActivityIndicator.IsRunningProperty);
            Assert.IsTrue(isRunning);
#endif
        }
Esempio n. 9
0
        public virtual void _Opacity()
        {
            var remote = new ViewContainerRemote(App, Test.VisualElement.Opacity, PlatformViewType);

            remote.GoTo();
#if __MACOS__
            Assert.Inconclusive("needs testing");
#elif WINDOWS
            Assert.Inconclusive(PleaseInspect);
#else
            float opacity = -1f;
            opacity = remote.GetProperty <float>(View.OpacityProperty);
            Assert.AreEqual(0.5f, opacity);
#endif
        }
Esempio n. 10
0
        public virtual void _Scale()
        {
            var remote = new ViewContainerRemote(App, Test.VisualElement.Scale, PlatformViewType);

            remote.GoTo();
#if __MACOS__
            Assert.Inconclusive("needs testing");
#else
#if WINDOWS
            Assert.Inconclusive(PleaseInspect);
#endif
            var    scaleMatrix     = remote.GetProperty <Matrix>(View.ScaleProperty);
            Matrix generatedMatrix = NumericExtensions.BuildScaleMatrix(0.5f);
            Assert.AreEqual(generatedMatrix, scaleMatrix);
#endif
        }