Skip to content

Commit 56ec933

Browse files
author
Bruce Eckel
committed
Update from latest version of book
1 parent a40b989 commit 56ec933

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+640
-613
lines changed

annotations/AtUnitComposition.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Creating non-embedded tests.
66
package annotations;
7-
import com.mindviewinc.atunit.*;
7+
import onjava.atunit.*;
88
import onjava.*;
99

1010
public class AtUnitComposition {
@@ -18,8 +18,7 @@ public class AtUnitComposition {
1818
}
1919
public static void main(String[] args) throws Exception {
2020
OSExecute.command(
21-
"java com.mindviewinc.atunit.AtUnit " +
22-
" AtUnitComposition");
21+
"java onjava.atunit.AtUnit AtUnitComposition.class");
2322
}
2423
}
2524
/* Output:

annotations/AtUnitExample1.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;
6-
import com.mindviewinc.atunit.*;
6+
import onjava.atunit.*;
77
import onjava.*;
88

99
public class AtUnitExample1 {
@@ -24,7 +24,7 @@ public int methodTwo() {
2424
@Test boolean anotherDisappointment() { return false; }
2525
public static void main(String[] args) throws Exception {
2626
OSExecute.command(
27-
"java com.mindviewinc.atunit.AtUnit AtUnitExample1");
27+
"java onjava.atunit.AtUnit AtUnitExample1.class");
2828
}
2929
}
3030
/* Output:

annotations/AtUnitExample2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Assertions and exceptions can be used in @Tests.
66
package annotations;
77
import java.io.*;
8-
import com.mindviewinc.atunit.*;
8+
import onjava.atunit.*;
99
import onjava.*;
1010

1111
public class AtUnitExample2 {
@@ -32,7 +32,7 @@ public int methodTwo() {
3232
}
3333
public static void main(String[] args) throws Exception {
3434
OSExecute.command(
35-
"java com.mindviewinc.atunit.AtUnit AtUnitExample2");
35+
"java onjava.atunit.AtUnit AtUnitExample2.class");
3636
}
3737
}
3838
/* Output:

annotations/AtUnitExample3.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;
6-
import com.mindviewinc.atunit.*;
6+
import onjava.atunit.*;
77
import onjava.*;
88

99
public class AtUnitExample3 {
@@ -27,7 +27,7 @@ public int methodTwo() {
2727
@Test boolean m2() { return methodTwo() == 2; }
2828
public static void main(String[] args) throws Exception {
2929
OSExecute.command(
30-
"java com.mindviewinc.atunit.AtUnit AtUnitExample3");
30+
"java onjava.atunit.AtUnit AtUnitExample3.class");
3131
}
3232
}
3333
/* Output:

annotations/AtUnitExample4.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;
66
import java.util.*;
7-
import com.mindviewinc.atunit.*;
7+
import onjava.atunit.*;
88
import onjava.*;
99

1010
public class AtUnitExample4 {
@@ -58,7 +58,7 @@ public String scrambleWord() {
5858
public static void main(String[] args) throws Exception {
5959
System.out.println("starting");
6060
OSExecute.command(
61-
"java com.mindviewinc.atunit.AtUnit AtUnitExample4");
61+
"java onjava.atunit.AtUnit AtUnitExample4.class");
6262
}
6363
}
6464
/* Output:

annotations/AtUnitExample5.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;
66
import java.io.*;
7-
import com.mindviewinc.atunit.*;
7+
import onjava.atunit.*;
88
import onjava.*;
99

1010
public class AtUnitExample5 {
@@ -42,7 +42,7 @@ public class AtUnitExample5 {
4242
}
4343
public static void main(String[] args) throws Exception {
4444
OSExecute.command(
45-
"java com.mindviewinc.atunit.AtUnit AtUnitExample5");
45+
"java onjava.atunit.AtUnit AtUnitExample5.class");
4646
}
4747
}
4848
/* Output:

annotations/AtUnitExternalTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Creating non-embedded tests.
66
package annotations;
7-
import com.mindviewinc.atunit.*;
7+
import onjava.atunit.*;
88
import onjava.*;
99

1010
public class AtUnitExternalTest extends AtUnitExample1 {
@@ -14,8 +14,7 @@ public class AtUnitExternalTest extends AtUnitExample1 {
1414
@Test boolean _methodTwo() { return methodTwo() == 2; }
1515
public static void main(String[] args) throws Exception{
1616
OSExecute.command(
17-
"java com.mindviewinc.atunit.AtUnit " +
18-
"AtUnitExternalTest");
17+
"java onjava.atunit.AtUnit AtUnitExternalTest.class");
1918
}
2019
}
2120
/* Output:

annotations/HashSetTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;
66
import java.util.*;
7-
import com.mindviewinc.atunit.*;
7+
import onjava.atunit.*;
88
import onjava.*;
99

1010
public class HashSetTest {
@@ -23,7 +23,7 @@ public class HashSetTest {
2323
}
2424
public static void main(String[] args) throws Exception {
2525
OSExecute.command(
26-
"java com.mindviewinc.atunit.AtUnit HashSetTest");
26+
"java onjava.atunit.AtUnit HashSetTest.class");
2727
}
2828
}
2929
/* Output:

annotations/StackLStringTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Applying @Unit to generics.
66
package annotations;
7-
import com.mindviewinc.atunit.*;
7+
import onjava.atunit.*;
88
import onjava.*;
99

1010
public class StackLStringTest extends StackL<String> {
@@ -28,8 +28,7 @@ public class StackLStringTest extends StackL<String> {
2828
}
2929
public static void main(String[] args) throws Exception {
3030
OSExecute.command(
31-
"java com.mindviewinc.atunit.AtUnit " +
32-
"StackLStringTest");
31+
"java onjava.atunit.AtUnit StackLStringTest.class");
3332
}
3433
}
3534
/* Output:

annotations/Testable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;
6-
import com.mindviewinc.atunit.*;
6+
import onjava.atunit.*;
77

88
public class Testable {
99
public void execute() {

0 commit comments

Comments
 (0)