public void CreateBox() { Assume.That(_Viewport, Is.Not.Null); // Start tool MainWindow.Ribbon.SelectGroup("Model"); MainWindow.Ribbon.ClickButton("CreateBox"); Assert.That(MainWindow.Ribbon.IsButtonChecked("CreateBox"), Is.True); // Three point creation _Viewport.ClickRelative(0.3, 0.3); _Viewport.ClickRelative(0.6, 0.6); _Viewport.ClickRelative(0.6, 0.3); // Tool has finished Assert.That(MainWindow.Ribbon.IsButtonChecked("CreateBox"), Is.False); // Check property panel for correct creation _BodyPanel = MainWindow.PropertyView.FindPanelByClass("BodyPropertyPanel"); Assert.That(_BodyPanel, Is.Not.Null); Assert.That(_BodyPanel.GetValue <string>("BodyName"), Is.EqualTo("Box_1")); _BoxPanel = MainWindow.PropertyView.FindPanelByClass("BoxPropertyPanel"); Assert.That(_BoxPanel, Is.Not.Null); Assert.That(_BoxPanel.GetValue <double>("BoxLength"), Is.GreaterThan(0.35)); Assert.That(_BoxPanel.GetValue <double>("BoxWidth"), Is.GreaterThan(5.0)); Assert.That(_BoxPanel.GetValue <double>("BoxHeight"), Is.GreaterThan(3.0)); }
public void CreateCylinder() { Assume.That(_Viewport, Is.Not.Null); // Start tool MainWindow.Ribbon.SelectGroup("Model"); MainWindow.Ribbon.ClickButton("CreateCylinder"); Assert.That(MainWindow.Ribbon.IsButtonChecked("CreateCylinder"), Is.True); // Three point creation _Viewport.ClickRelative(0.5, 0.5); _Viewport.ClickRelative(0.5, 0.7); _Viewport.ClickRelative(0.5, 0.3); // Tool has finished Assert.That(MainWindow.Ribbon.IsButtonChecked("CreateCylinder"), Is.False); // Check property panel for correct creation _BodyPanel = MainWindow.PropertyView.FindPanelByClass("BodyPropertyPanel"); Assert.That(_BodyPanel, Is.Not.Null); Assert.That(_BodyPanel.GetValue <string>("BodyName"), Is.EqualTo("Cylinder_1")); _CylinderPanel = MainWindow.PropertyView.FindPanelByClass("CylinderPropertyPanel"); Assert.That(_CylinderPanel, Is.Not.Null); Assert.That(_CylinderPanel.GetValue <double>("CylinderRadius"), Is.GreaterThan(3.0)); Assert.That(_CylinderPanel.GetValue <double>("CylinderHeight"), Is.GreaterThan(2.0)); Assert.That(_CylinderPanel.GetValue <double>("CylinderSegment"), Is.EqualTo(360.0)); }