Commit 0696bbb0 authored by Suleman Hussain's avatar Suleman Hussain

u

parent dc761705
......@@ -31,11 +31,6 @@ public class Rectangle extends Shape{
this.setHeight(j);
this.setWidth(i);
}
public Rectangle(int i) {
super();
this.setWidth(i);
}
@Override
public void draw() {
......
......@@ -83,7 +83,7 @@ public class unitTest {
@Test
public void testRectangleConstructor() {
// test default constructor
Shape testShape = new Rectangle();
Rectangle testShape = new Rectangle();
assertEquals(3, testShape.getWidth());
assertEquals(4, testShape.getHeight());
......@@ -96,7 +96,7 @@ public class unitTest {
@Test
public void testRectangleWidth() {
// test setSize()
Shape testShape = new Rectangle(5,4);
Rectangle testShape = new Rectangle(5,4);
testShape.setWidth(6);
assertEquals(6, testShape.getWidth());
}
......@@ -104,7 +104,7 @@ public class unitTest {
@Test
public void testRectangleHeight() {
// test setSize()
Shape testShape = new Rectangle(78);
Rectangle testShape = new Rectangle(7,8);
testShape.setHeight(3);
assertEquals(3, testShape.getHeight());
}
......@@ -112,14 +112,14 @@ public class unitTest {
@Test
public void testRectangleCircumference() {
// test circumference()
Shape testShape = new Rectangle(6,3);
Rectangle testShape = new Rectangle(6,3);
assertEquals(18.0, testShape.circumference(), 1e-6);
}
@Test
public void testRectangleArea() {
// test area()
Shape testShape = new Rectangle(5,7);
Rectangle testShape = new Rectangle(5,7);
assertEquals(35.0, testShape.area(), 1e-6);
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment