public void Arrange_Should_Set_VisualOffset() { FrameworkElementTest target = new FrameworkElementTest(); target.Arrange(new Rect(new Point(12, 23), new Size(12, 34))); Assert.AreEqual(new Vector(12, 23), target.VisualOffset); }
public void Arrange_Should_Set_IsMeasureValid_And_IsArrangeValid_To_True() { FrameworkElementTest target = new FrameworkElementTest(); target.Arrange(new Rect(new Point(12, 23), new Size(34, 45))); Assert.IsTrue(target.IsMeasureValid); Assert.IsTrue(target.IsArrangeValid); }
public void Arrange_Should_Set_Actual_And_Render_Size() { FrameworkElementTest target = new FrameworkElementTest(); target.ArrangeOutput = new Size(12, 23); target.Arrange(new Rect(new Point(34, 45), new Size(56, 67))); Assert.AreEqual(12, target.ActualWidth); Assert.AreEqual(23, target.ActualHeight); Assert.AreEqual(new Size(12, 23), target.RenderSize); }
public void Arrange_Size_Should_Be_Passed_To_ArrangeOverride_For_Stretch_Alignment() { FrameworkElementTest target = new FrameworkElementTest(); target.MeasureOutput = new Size(12, 23); target.Measure(new Size(34, 45)); target.RecordInputs = true; target.Arrange(new Rect(new Point(56, 67), new Size(78, 89))); Assert.AreEqual(new Size(78, 89), target.ArrangeInput); }
public void Measure_Height_Should_Be_Passed_To_ArrangeOverride_For_Bottom_Alignment() { FrameworkElementTest target = new FrameworkElementTest(); target.VerticalAlignment = VerticalAlignment.Bottom; target.MeasureOutput = new Size(12, 23); target.Measure(new Size(34, 45)); target.RecordInputs = true; target.Arrange(new Rect(new Point(56, 67), new Size(78, 89))); Assert.AreEqual(new Size(78, 23), target.ArrangeInput); }
public void Measure_Width_Should_Be_Passed_To_ArrangeOverride_For_Right_Alignment() { FrameworkElementTest target = new FrameworkElementTest(); target.HorizontalAlignment = HorizontalAlignment.Center; target.MeasureOutput = new Size(12, 23); target.Measure(new Size(34, 45)); target.RecordInputs = true; target.Arrange(new Rect(new Point(56, 67), new Size(78, 89))); Assert.AreEqual(new Size(12, 89), target.ArrangeInput); }
public void Arrange_Should_Set_VisualOffset() { FrameworkElementTest target = new FrameworkElementTest(); target.Arrange(new Rect(new Point(12, 23), new Size(12, 34))); Assert.AreEqual(new Vector(12, 23), target.VisualOffset); }
public void Measure_Width_Height_Should_Be_Passed_To_ArrangeOverride_For_TopLeft_Alignment() { FrameworkElementTest target = new FrameworkElementTest(); target.VerticalAlignment = VerticalAlignment.Top; target.HorizontalAlignment = HorizontalAlignment.Left; target.MeasureOutput = new Size(12, 23); target.Measure(new Size(34, 45)); target.RecordInputs = true; target.Arrange(new Rect(new Point(56, 67), new Size(78, 89))); Assert.AreEqual(new Size(12, 23), target.ArrangeInput); }
public void Arrange_Size_Should_Be_Passed_To_ArrangeOverride_For_Stretch_Alignment() { FrameworkElementTest target = new FrameworkElementTest(); target.MeasureOutput = new Size(12, 23); target.Measure(new Size(34, 45)); target.RecordInputs = true; target.Arrange(new Rect(new Point(56, 67), new Size(78, 89))); Assert.AreEqual(new Size(78, 89), target.ArrangeInput); }
public void Arrange_Should_Set_Actual_And_Render_Size() { FrameworkElementTest target = new FrameworkElementTest(); target.ArrangeOutput = new Size(12, 23); target.Arrange(new Rect(new Point(34, 45), new Size(56, 67))); Assert.AreEqual(12, target.ActualWidth); Assert.AreEqual(23, target.ActualHeight); Assert.AreEqual(new Size(12, 23), target.RenderSize); }
public void Arrange_Should_Set_IsMeasureValid_And_IsArrangeValid_To_True() { FrameworkElementTest target = new FrameworkElementTest(); target.Arrange(new Rect(new Point(12, 23), new Size(34, 45))); Assert.IsTrue(target.IsMeasureValid); Assert.IsTrue(target.IsArrangeValid); }