Пример #1
0
        public void FontMetricsConstructor()
        {
            tlog.Debug(tag, $"FontMetricsConstructor START");

            var testingTarget = new FontMetrics();

            Assert.IsNotNull(testingTarget, "Can't create success object FontMetrics.");
            Assert.IsInstanceOf <FontMetrics>(testingTarget, "Should return FontMetrics instance.");

            testingTarget.Dispose();
            tlog.Debug(tag, $"FontMetricsConstructor END (OK)");
        }
Пример #2
0
        public void FontMetricsDescender()
        {
            tlog.Debug(tag, $"FontMetricsDescender START");

            var testingTarget = new FontMetrics();

            Assert.IsNotNull(testingTarget, "Can't create success object FontMetrics.");
            Assert.IsInstanceOf <FontMetrics>(testingTarget, "Should return FontMetrics instance.");

            testingTarget.Descender = 0.3f;
            Assert.AreEqual(0.3f, testingTarget.Descender, "Should be equal!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"FontMetricsDescender END (OK)");
        }
Пример #3
0
        public void FontMetricsUnderlineThickness()
        {
            tlog.Debug(tag, $"FontMetricsUnderlineThickness START");

            var testingTarget = new FontMetrics();

            Assert.IsNotNull(testingTarget, "Can't create success object FontMetrics.");
            Assert.IsInstanceOf <FontMetrics>(testingTarget, "Should return FontMetrics instance.");

            testingTarget.UnderlinePosition = 0.1f;
            Assert.AreEqual(0.1f, testingTarget.UnderlinePosition, "Should be equal!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"FontMetricsUnderlineThickness END (OK)");
        }
Пример #4
0
        public void FontMetricsConstructorWithFloats()
        {
            tlog.Debug(tag, $"FontMetricsConstructorWithFloats START");

            var testingTarget = new FontMetrics(0.3f, 0.1f, 0.5f, 0.9f, 0.0f);

            Assert.IsNotNull(testingTarget, "Can't create success object FontMetrics.");
            Assert.IsInstanceOf <FontMetrics>(testingTarget, "Should return FontMetrics instance.");

            testingTarget.UnderlineThickness = 0.3f;
            tlog.Debug(tag, "UnderlineThickness :" + testingTarget.UnderlineThickness);

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