package permissions.dispatcher.processor;

import org.junit.Test;

import jdk.nashorn.internal.ir.annotations.Ignore;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * Unit test for {@link ClassType}.
 */
public class ClassTypeTest {

    private static final TypeResolver MOCK_RESOLVER = new TypeResolver() {
        @Override
        public boolean isSubTypeOf(String subTypeClass, String superTypeClass) {
            String superTypeWithoutPackage = superTypeClass.substring(superTypeClass.lastIndexOf('.') + 1);
            return subTypeClass.contains(superTypeWithoutPackage);
        }
    };

    @Test
    public void getActivityTest() {
        assertThat(ClassType.ACTIVITY.getActivity()).isEqualTo("target");
        assertThat(ClassType.FRAGMENT.getActivity()).isEqualTo("target.getActivity()");
    }

    @Test
    @Ignore
    public void getClassTypeTest() {
        assertThat(ClassType.getClassType("MainActivity", MOCK_RESOLVER)).isEqualTo(ClassType.ACTIVITY);
        assertThat(ClassType.getClassType("MainFragment", MOCK_RESOLVER)).isEqualTo(ClassType.FRAGMENT);
        assertThat(ClassType.getClassType("ActivityMain", MOCK_RESOLVER)).isEqualTo(ClassType.ACTIVITY);
        assertThat(ClassType.getClassType("FragmentMain", MOCK_RESOLVER)).isEqualTo(ClassType.FRAGMENT);
        assertThat(ClassType.getClassType("MyService", MOCK_RESOLVER)).isNull();
        assertThat(ClassType.getClassType("SomeBroadcastReceiver", MOCK_RESOLVER)).isNull();
    }

}

@@ -64,60 +64,8 @@
 t;%0A%0A
-import jdk.nashorn.internal.ir.annotations.Ignore;%0A%0A
 impo
@@ -201,1236 +201,209 @@
     
-private static final TypeResolver MOCK_RESOLVER = new TypeResolver() %7B%0A        @Override%0A        public boolean isSubTypeOf(String subTypeClass, String superTypeClass) %7B%0A            String superTypeWithoutPackage = superTypeClass.substring(superTypeClass.lastIndexOf('.') + 1);%0A            return subTypeClass.contains(superTypeWithoutPackage);%0A        %7D%0A    %7D;%0A%0A    @Test%0A    public void getActivityTest() %7B%0A        assertThat(ClassType.ACTIVITY.getActivity()).isEqualTo(%22target%22);%0A        assertThat(ClassType.FRAGMENT.getActivity()).isEqualTo(%22target.getActivity()%22);%0A    %7D%0A%0A    @Test%0A    @Ignore%0A    public void getClassTypeTest() %7B%0A        assertThat(ClassType.getClassType(%22MainActivity%22, MOCK_RESOLVER)).isEqualTo(ClassType.ACTIVITY);%0A        assertThat(ClassType.getClassType(%22MainFragment%22, MOCK_RESOLVER)).isEqualTo(ClassType.FRAGMENT);%0A        assertThat(ClassType.getClassType(%22ActivityMain%22, MOCK_RESOLVER)).isEqualTo(ClassType.ACTIVITY);%0A        assertThat(ClassType.getClassType(%22FragmentMain%22, MOCK_RESOLVER)).isEqualTo(ClassType.FRAGMENT);%0A        assertThat(ClassType.getClassType(%22MyService%22, MOCK_RESOLVER)).isNull();%0A        assertThat(ClassType.getClassType(%22SomeBroadcastReceiver%22, MOCK_RESOLVER)).isNull(
+@Test%0A    public void getActivityTest() %7B%0A        assertThat(ClassType.ACTIVITY.getActivity()).isEqualTo(%22target%22);%0A        assertThat(ClassType.FRAGMENT.getActivity()).isEqualTo(%22target.getActivity()%22
 );%0A 

Delete unnecesarry test case.