public void TestScale() { Vector3F[] oldScale = _testShapes.StoreShapeScalingArray(); foreach (Shape3D shape in _testShapes) shape.Scaling = new Vector3F( 3.0f, 1.0f, 1.0f ); Vector3F[] newScale = _testShapes.StoreShapeScalingArray(); IAction scaleAction = new ScaleShapesAction( _testShapes, oldScale, newScale ); ResetPropertyChanged(); scaleAction.Do(); Assert.AreEqual( newScale[0], (_testShapes[0] as Shape3D).Scaling ); Assert.AreEqual( newScale[1], (_testShapes[1] as Shape3D).Scaling ); Assert.AreEqual( true, _propertyChanged ); ResetPropertyChanged(); scaleAction.Undo(); Assert.AreEqual( oldScale[0], (_testShapes[0] as Shape3D).Scaling ); Assert.AreEqual( oldScale[1], (_testShapes[1] as Shape3D).Scaling ); Assert.AreEqual( true, _propertyChanged ); ResetPropertyChanged(); scaleAction.Do(); Assert.AreEqual( newScale[0], (_testShapes[0] as Shape3D).Scaling ); Assert.AreEqual( newScale[1], (_testShapes[1] as Shape3D).Scaling ); Assert.AreEqual( true, _propertyChanged ); }