Пример #1
0
 public void TestScaleRectangle150Percent()
 {
     Rectangle rectangle = new Rectangle(10, 15);
     rectangle.Scale(150);
     Assert.AreEqual(15, rectangle.Width);
     Assert.AreEqual((decimal) 22.5, rectangle.Height);
 }
Пример #2
0
 public void TestScaleRectangleUpAndDown()
 {
     Rectangle rectangle = new Rectangle(10, 15);
     rectangle.Scale(50);
     rectangle.Scale(200);
     Assert.AreEqual(10, rectangle.Width);
     Assert.AreEqual(15, rectangle.Height);
 }
Пример #3
0
 public void TestScaleRectangleToNegativePercent()
 {
     Rectangle rectangle = new Rectangle(10, 15);
     rectangle.Scale(-5);
 }
Пример #4
0
 public void TestScaleRectangleTo0Percent()
 {
     Rectangle rectangle = new Rectangle(10, 15);
     rectangle.Scale(0);
 }
Пример #5
0
 public void TestScaleRectangle37Percent()
 {
     Rectangle rectangle = new Rectangle(10, 15);
     rectangle.Scale(37);
     Assert.AreEqual((decimal) 3.7, rectangle.Width);
     Assert.AreEqual((decimal) 5.55, rectangle.Height);
 }
Пример #6
0
 public void TestScaleRectangle200Percent()
 {
     Rectangle rectangle = new Rectangle(10, 15);
     rectangle.Scale(200);
     Assert.AreEqual(20, rectangle.Width);
     Assert.AreEqual(30, rectangle.Height);
 }