System.Drawing.Tests.FontTests.GetHeight_Parameterless_ReturnsExpected C# (CSharp) Method

GetHeight_Parameterless_ReturnsExpected() private method

private GetHeight_Parameterless_ReturnsExpected ( ) : void
return void
        public void GetHeight_Parameterless_ReturnsExpected()
        {
            using (FontFamily family = FontFamily.GenericSansSerif)
            using (var font = new Font(family, 10))
            {
                float height = font.GetHeight();
                AssertExtensions.GreaterThan(height, 0);

                Assert.Equal((int)Math.Ceiling(height), font.Height);
            }
        }
FontTests