public void Tab_Glyph_Run_Shuld_Have_Zero_Width() { using var app = UnitTestApplication.Start(new TestServices().With( renderInterface: new MockPlatformRenderInterface(), fontManagerImpl: new MockFontManagerImpl(), formattedTextImpl: Mock.Of <IFormattedTextImpl>())); double runHeight = 20; Mock <TextLine> textLineMock = new Mock <TextLine>(); textLineMock.Setup( t => t.Height).Returns(runHeight); TabTextElement tabTextElement = new TabTextElement(textLineMock.Object); TabGlyphRun tabRun = new TabGlyphRun( tabTextElement, CreateDefaultTextProperties()); Size runSize = tabRun.GetSize(double.PositiveInfinity); Assert.AreEqual(0, runSize.Width, "Wrong run width"); Assert.AreEqual(runHeight, runSize.Height, "Wrong run height"); }
public TabGlyphRun(TabTextElement element, TextRunProperties properties) { if (properties == null) { throw new ArgumentNullException("properties"); } this.properties = properties; this.element = element; }
public TabGlyphRun(TabTextElement element, TextRunProperties properties) { Properties = properties ?? throw new ArgumentNullException(nameof(properties)); _element = element; }
public TabGlyphRun(TabTextElement element, TextRunProperties properties) { if (properties == null) throw new ArgumentNullException("properties"); this.properties = properties; this.element = element; }