testprivateinterface.java

来自「著名的uncle Bob的Agile software development的」· Java 代码 · 共 21 行

JAVA
21
字号
import junit.framework.*;
import junit.swingui.TestRunner;

public class TestPrivateInterface extends TestCase
{
  public static void main(String[] args)
  {
    TestRunner.main(new String[]{"TestPrivateInterface"});
  }

  public TestPrivateInterface(String name)
  {
    super(name);
  }

  public void testInvokeF() throws Exception
  {
    ClassWithPrivateMethod c = new ClassWithPrivateMethod();
    c.getPrivateMethodAccessor().private_f();
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?