Create a new class in Eclipse (call it MockConection) that implements the Connection interface. Check the option to generate stubs for inherited abstract methods (see Figure 2).
在Eclipse中创建一个完成Connection接口的新类(称它为MockConection),检查为继承的抽象方法产生桩模块的选项(见图2)。
If the normal class contains abstract method, then one can creating the object for that class and may call the abstract method just like normal method.
如果正常类包含抽象方法,则可以创建该类的对象,可以调用抽象方法就像普通的方法。
If the normal class contains abstract method, then one can creating the object for that class and may call the abstract method just like normal method.
如果正常类包含抽象方法,则可以创建该类的对象,可以调用抽象方法就像普通的方法。
应用推荐