예제 #1
0
        public void NPatchVisualConstructor()
        {
            tlog.Debug(tag, $"NPatchVisualConstructor START");

            var testingTarget = new NPatchVisual();

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"NPatchVisualConstructor END (OK)");
        }
예제 #2
0
        public void NPatchVisualBorderOnly()
        {
            tlog.Debug(tag, $"NPatchVisualBorderOnly START");

            var testingTarget = new NPatchVisual();

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

            testingTarget.BorderOnly = true;
            Assert.AreEqual(true, testingTarget.BorderOnly, "Retrieved BorderOnly should be equal to set value");

            testingTarget.Dispose();
            tlog.Debug(tag, $"NPatchVisualBorderOnly END (OK)");
        }
예제 #3
0
        public void NPatchVisualURL()
        {
            tlog.Debug(tag, $"NPatchVisualURL START");

            var testingTarget = new NPatchVisual();

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

            testingTarget.URL = image_path;
            Assert.AreEqual(image_path, testingTarget.URL, "Retrieved URL should be equal to set value");

            testingTarget.Dispose();
            tlog.Debug(tag, $"NPatchVisualURL END (OK)");
        }
예제 #4
0
        public void NPatchVisualBorder()
        {
            tlog.Debug(tag, $"NPatchVisualBorder START");

            var testingTarget = new NPatchVisual();

            using (Rectangle rec = new Rectangle(0, 0, 10, 10))
            {
                testingTarget.Border = rec;
                Assert.AreEqual(0, testingTarget.Border.X, "Retrieved BorderOnly should be equal to set value");
                Assert.AreEqual(0, testingTarget.Border.Y, "Retrieved BorderOnly should be equal to set value");
                Assert.AreEqual(10, testingTarget.Border.Width, "Retrieved BorderOnly should be equal to set value");
                Assert.AreEqual(10, testingTarget.Border.Height, "Retrieved BorderOnly should be equal to set value");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"NPatchVisualBorder END (OK)");
        }