01: package test.privatemethod;
02:
03: import org.testng.Assert;
04:
05: public class PrivateMethodTest {
06: public PrivateMethodTest(String name, int value) {
07: }
08:
09: private int privateMethod() {
10: return 1;
11: }
12:
13: public static class PrivateMethodInnerTest {
14: /**
15: * @testng.test
16: */
17: public void testPrivateMethod() {
18: PrivateMethodTest pmt = new PrivateMethodTest("aname", 1);
19: int returnValue = pmt.privateMethod();
20:
21: Assert.assertEquals(returnValue, 1);
22: }
23: }
24: }
|