Example #1
0
            public void BindingInOnPlatform(bool useCompiledXaml)
            {
                ((MockPlatformServices)Device.PlatformServices).RuntimePlatform = Device.iOS;
                var p = new Bz44213(useCompiledXaml);

                p.BindingContext = new { Foo = "Foo", Bar = "Bar" };
                Assert.AreEqual("Foo", p.label.Text);
                ((MockPlatformServices)Device.PlatformServices).RuntimePlatform = Device.Android;
                p = new Bz44213(useCompiledXaml);
                p.BindingContext = new { Foo = "Foo", Bar = "Bar" };
                Assert.AreEqual("Bar", p.label.Text);
            }
Example #2
0
            public void BindingInOnPlatform(bool useCompiledXaml)
            {
                mockDeviceInfo.Platform = DevicePlatform.iOS;
                var p = new Bz44213(useCompiledXaml);

                p.BindingContext = new { Foo = "Foo", Bar = "Bar" };
                Assert.AreEqual("Foo", p.label.Text);
                mockDeviceInfo.Platform = DevicePlatform.Android;
                p = new Bz44213(useCompiledXaml);
                p.BindingContext = new { Foo = "Foo", Bar = "Bar" };
                Assert.AreEqual("Bar", p.label.Text);
            }