public void With_Header(RibbonTitleBarSizeData testdata) { var titlebar = CreateNewTitlebar(); using (new TestRibbonWindow(titlebar)) { titlebar.Measure(new Size(testdata.ConstraintWidth, ReferenceHeight)); var resultData = new RibbonTitleBarSizeData(testdata.ConstraintWidth, titlebar); Assert.That(resultData, Is.EqualTo(testdata)); } }
public void With_Wide_Header(RibbonTitleBarSizeData testdata) { var titlebar = CreateNewTitlebar(); titlebar.Header = "This is a really wide header which needs some more space"; using (new TestRibbonWindow(titlebar)) { titlebar.Measure(new Size(testdata.ConstraintWidth, ReferenceHeight)); var resultData = new RibbonTitleBarSizeData(testdata.ConstraintWidth, titlebar); Assert.That(resultData, Is.EqualTo(testdata)); } }
public void With_Header_And_QuickAccessItems(RibbonTitleBarSizeData testdata) { var titlebar = CreateNewTitlebar(); var quickAccessToolBar = (QuickAccessToolBar)(titlebar.QuickAccessToolBar = new QuickAccessToolBar()); using (new TestRibbonWindow(titlebar)) { quickAccessToolBar.Items.Add(new TextBlock { Text = "ABC" }); quickAccessToolBar.Items.Add(new TextBlock { Text = "ABC" }); quickAccessToolBar.Items.Add(new TextBlock { Text = "ABC" }); titlebar.Measure(new Size(testdata.ConstraintWidth, ReferenceHeight)); var resultData = new RibbonTitleBarSizeData(testdata.ConstraintWidth, titlebar); Assert.That(resultData, Is.EqualTo(testdata)); } }