Esempio n. 1
0
        public void CurrentMaxTrackImage_BackingFields()
        {
            if (SliderPoker.NewRefcountEnabled())
            {
                Assert.Inconclusive("backing fields are removed when newrefcount is enabled");
            }

            using (var i = new UIImage())
                using (var s = new SliderPoker()) {
                    // default constructor does not set any UIViewController so the backing fields are null
                    Assert.Null(s.CurrentMaxTrackImageBackingField, "1a");
                    Assert.Null(s.CurrentMaxTrackImage, "1b");

                    s.SetMaxTrackImage(i, UIControlState.Normal);
                    Assert.NotNull(s.CurrentMaxTrackImageBackingField, "1c");
                    Assert.NotNull(s.CurrentMaxTrackImage, "1d");
                }
        }
Esempio n. 2
0
        public void Ctor_Default_BackingFields()
        {
            if (SliderPoker.NewRefcountEnabled())
            {
                Assert.Inconclusive("backing fields are removed when newrefcount is enabled");
            }

            using (var s = new SliderPoker()) {
                // default constructor does not set any UIViewController so the backing fields are null
                Assert.Null(s.CurrentThumbImageBackingField, "1a");
                Assert.Null(s.CurrentMinTrackImageBackingField, "2a");
                Assert.Null(s.CurrentMaxTrackImageBackingField, "3a");
                Assert.Null(s.MinValueImageBackingField, "4a");
                Assert.Null(s.MaxValueImageBackingField, "5a");

                Assert.Null(s.CurrentThumbImage, "1b");
                Assert.Null(s.CurrentMinTrackImage, "2b");
                Assert.Null(s.CurrentMaxTrackImage, "3b");
                Assert.Null(s.MinValueImage, "4b");
                Assert.Null(s.MaxValueImage, "5b");
            }
        }