public void PlatformToSystemException(float width, float height)
        {
#if __IOS__
            var platform = new CoreGraphics.CGSize(width, height);
            Assert.Throws <ArgumentOutOfRangeException>(() => platform.ToSystemSize());
#elif WINDOWS_UWP
            var platform = new Windows.Foundation.Size(width, height);
            Assert.Throws <ArgumentOutOfRangeException>(() => platform.ToSystemSize());
#endif
        }
Exemple #2
0
        public void PlatformToSystem()
        {
#if __IOS__
            var platform = new CoreGraphics.CGSize(width, height);
#elif __ANDROID__
            var platform = new Android.Util.Size(width, height);
#else
            var platform = new Windows.Foundation.Size(width, height);
#endif
            var system = platform.ToSystemSize();

            Assert.Equal(width, system.Width);
            Assert.Equal(height, system.Height);
        }