MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / AtUnitExample3

Class AtUnitExample3

annotations/AtUnitExample3.java:11–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9import onjava.*;
10
11public class AtUnitExample3 {
12 private int n;
13 public AtUnitExample3(int n) { this.n = n; }
14 public int getN() { return n; }
15 public String methodOne() {
16 return "This is methodOne";
17 }
18 public int methodTwo() {
19 System.out.println("This is methodTwo");
20 return 2;
21 }
22 @TestObjectCreate
23 static AtUnitExample3 create() {
24 return new AtUnitExample3(47);
25 }
26 @Test
27 boolean initialization() { return n == 47; }
28 @Test
29 boolean methodOneTest() {
30 return methodOne().equals("This is methodOne");
31 }
32 @Test
33 boolean m2() { return methodTwo() == 2; }
34}
35/* Output:
36annotations.AtUnitExample3
37 . initialization

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected