Skip to content

DontMoveAbstract test

Artyom Lobanov edited this page Jul 11, 2017 · 1 revision

Check that the algorithms don't try to move abstract methods.

Expected refactorings
Member Move to
- -
package dontMoveAbstract;

public abstract class ClassA {

    abstract void foo();
}
package dontMoveAbstract;

public class ClassB {

    public void doSomething(ClassA a) {
        a.foo();
        a.foo();
        a.foo();
        a.foo();
        a.foo();
        a.foo();
        a.foo();
        a.foo();
    }

    public void doSomething2(ClassA a) {
        a.foo();
        a.foo();
        a.foo();
        a.foo();
        a.foo();
        a.foo();
        a.foo();
        a.foo();
    }
}