Пример #1
0
 public void ClearShadow(View view)
 {
     ImageShadow?.Reset(view);
     BoxShadow?.Reset(view);
     ImageShadow = null;
     BoxShadow   = null;
 }
Пример #2
0
 public void Reset(View view)
 {
     BackgroundColor?.Reset(view);
     BackgroundImage?.Reset(view);
     BackgroundImageBorder?.Reset(view);
     Color?.Reset(view);
     Opacity?.Reset(view);
     ImageShadow?.Reset(view);
     BoxShadow?.Reset(view);
 }
Пример #3
0
 public void Reset(View view)
 {
     BackgroundColor.Reset(view);
     BackgroundImage.Reset(view);
     BackgroundImageBorder.Reset(view);
     Color.Reset(view);
     Opacity.Reset(view);
     ImageShadow.Reset(view);
     BoxShadow.Reset(view);
     CornerRadius.Reset(view);
 }
Пример #4
0
        public void ImageShadowConstructor()
        {
            tlog.Debug(tag, $"ImageShadowConstructor START");

            var testingTarget = new ImageShadow();

            Assert.IsNotNull(testingTarget, "Can't create success object ImageShadow");
            Assert.IsInstanceOf <ImageShadow>(testingTarget, "Should be an instance of ImageShadow type.");

            tlog.Debug(tag, $"ImageShadowConstructor END (OK)");
        }
Пример #5
0
        public void ImageShadowConstructorWithBorder()
        {
            tlog.Debug(tag, $"ImageShadowConstructorWithBorder START");

            var testingTarget = new ImageShadow(url, new Rectangle(5, 5, 5, 5), new Vector2(20, 30), new Vector2(30, 40));

            Assert.IsNotNull(testingTarget, "Can't create success object ImageShadow");
            Assert.IsInstanceOf <ImageShadow>(testingTarget, "Should be an instance of ImageShadow type.");

            tlog.Debug(tag, $"ImageShadowConstructorWithBorder END (OK)");
        }
Пример #6
0
        public void ImageShadowConstructorWithByPropertyMap()
        {
            tlog.Debug(tag, $"ImageShadowConstructorWithByPropertyMap START");

            using (PropertyMap map = new PropertyMap())
            {
                var testingTarget = new ImageShadow(map);
                Assert.IsNotNull(testingTarget, "Can't create success object ImageShadow");
                Assert.IsInstanceOf <ImageShadow>(testingTarget, "Should be an instance of ImageShadow type.");

                tlog.Debug(tag, $"ImageShadowConstructorWithByPropertyMap END (OK)");
            }
        }
Пример #7
0
        public void ImageShadowIsEmpty()
        {
            tlog.Debug(tag, $"ImageShadowIsEmpty START");

            var testingTarget = new ImageShadow();

            Assert.IsNotNull(testingTarget, "Can't create success object ImageShadow");
            Assert.IsInstanceOf <ImageShadow>(testingTarget, "Should be an instance of ImageShadow type.");

            var result = testingTarget.IsEmpty();

            Assert.IsTrue(result);

            tlog.Debug(tag, $"ImageShadowIsEmpty END (OK)");
        }
Пример #8
0
        public void ImageShadowConstructorWithNullImageShadow()
        {
            tlog.Debug(tag, $"ImageShadowConstructorWithNullImageShadow START");

            ImageShadow shadow = null;

            try
            {
                var testingTarget = new ImageShadow(shadow);
            }
            catch (ArgumentNullException)
            {
                tlog.Debug(tag, $"ImageShadowConstructorWithNullImageShadow END (OK)");
                Assert.Pass("Caught ArgumentNullException: Passed!");
            }
        }
Пример #9
0
        public void ImageShadowGetHashCode()
        {
            tlog.Debug(tag, $"ImageShadowGetHashCode START");

            var testingTarget = new ImageShadow();

            Assert.IsNotNull(testingTarget, "Can't create success object ImageShadow");
            Assert.IsInstanceOf <ImageShadow>(testingTarget, "Should be an instance of ImageShadow type.");

            testingTarget.Border = new Rectangle(5, 5, 5, 5);
            testingTarget.Url    = url;

            var result = testingTarget.GetHashCode();

            Assert.IsNotNull(result);

            tlog.Debug(tag, $"ImageShadowGetHashCode END (OK)");
        }
Пример #10
0
        public void ImageShadowEquals()
        {
            tlog.Debug(tag, $"ImageShadowEquals START");

            var testingTarget = new ImageShadow();

            Assert.IsNotNull(testingTarget, "Can't create success object ImageShadow");
            Assert.IsInstanceOf <ImageShadow>(testingTarget, "Should be an instance of ImageShadow type.");

            var result = testingTarget.Equals(new ImageShadow());

            Assert.IsTrue(result);

            testingTarget.Url = url;
            result            = testingTarget.Equals(new ImageShadow());
            Assert.IsFalse(result);

            tlog.Debug(tag, $"ImageShadowEquals END (OK)");
        }