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

GetHeight_Graphics_ReturnsExpected() private method

private GetHeight_Graphics_ReturnsExpected ( ) : void
return void
        public void GetHeight_Graphics_ReturnsExpected()
        {
            using (FontFamily family = FontFamily.GenericSansSerif)
            using (var font = new Font(family, 10))
            using (var image = new Bitmap(10, 10))
            using (Graphics graphics = Graphics.FromImage(image))
            {
                Assert.Equal(font.GetHeight(graphics.DpiY), font.GetHeight(graphics), 5);
            }
        }
FontTests