示例#1
0
            public void OnPlatformMarkupInStyle(bool useCompiledXaml)
            {
                mockDeviceInfo.Platform = DevicePlatform.iOS;
                var layout = new Gh3862(useCompiledXaml);

                Assert.That(layout.label.TextColor, Is.EqualTo(Colors.Pink));
                Assert.That(layout.label.IsVisible, Is.False);

                mockDeviceInfo.Platform = DevicePlatform.Android;

                layout = new Gh3862(useCompiledXaml);
                Assert.That(layout.label.IsVisible, Is.True);
            }
示例#2
0
            public void OnPlatformMarkupInStyle(bool useCompiledXaml)
            {
                Device.PlatformServices = new MockPlatformServices {
                    RuntimePlatform = Device.iOS
                };
                var layout = new Gh3862(useCompiledXaml);

                Assert.That(layout.label.TextColor, Is.EqualTo(Colors.Pink));
                Assert.That(layout.label.IsVisible, Is.False);

                Device.PlatformServices = new MockPlatformServices {
                    RuntimePlatform = Device.Android
                };

                layout = new Gh3862(useCompiledXaml);
                Assert.That(layout.label.IsVisible, Is.True);
            }