Skip to content

Commit b209ba5

Browse files
committed
Place helper classes directly below the tests that use them
1 parent ecec707 commit b209ba5

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

  • JavaReleases/src/test/java/pl/mperor/lab/java

‎JavaReleases/src/test/java/pl/mperor/lab/java/Java25.java‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ public void testValidateArgumentBeforeSuperCall() {
4444
Assertions.assertThrows(IllegalArgumentException.class, () -> new PositiveBox(-1));
4545
}
4646

47-
@Test
48-
public void testFieldAssignedBeforeSuperVisibleToOverriddenMethod() {
49-
var circle = new Circle(2.5);
50-
Assertions.assertEquals("circle r=2.5", circle.description);
51-
}
52-
5347
static class Box {
5448
final int value;
5549

@@ -69,6 +63,12 @@ static class PositiveBox extends Box {
6963
}
7064
}
7165

66+
@Test
67+
public void testFieldAssignedBeforeSuperVisibleToOverriddenMethod() {
68+
var circle = new Circle(2.5);
69+
Assertions.assertEquals("circle r=2.5", circle.description);
70+
}
71+
7272
static class Shape {
7373
Shape() {
7474
describe(); // an overridable method invoked from the superclass constructor
@@ -98,4 +98,4 @@ void describe() {
9898
}
9999
}
100100

101-
}
101+
}

0 commit comments

Comments
 (0)