Search in sources :

Example 1 with NullProgressMonitor

use of com.liferay.blade.util.NullProgressMonitor in project liferay-ide by liferay.

the class RestoreEntryTagsTest method findProblems.

@Test
public void findProblems() throws Exception {
    ServiceReference<Migration> sr = context.getServiceReference(Migration.class);
    Migration m = context.getService(sr);
    List<Problem> problems = m.findProblems(new File("jsptests/restore-entry/"), new NullProgressMonitor());
    assertEquals(1, problems.size());
    boolean found = false;
    for (Problem problem : problems) {
        if (problem.file.getName().endsWith("RestoreEntryTagsTest.jsp")) {
            if (problem.lineNumber == 2 && problem.startOffset >= 12 && problem.endOffset >= 318) {
                found = true;
            }
        }
    }
    if (!found) {
        fail();
    }
}
Also used : NullProgressMonitor(com.liferay.blade.util.NullProgressMonitor) Migration(com.liferay.blade.api.Migration) Problem(com.liferay.blade.api.Problem) File(java.io.File) Test(org.junit.Test)

Example 2 with NullProgressMonitor

use of com.liferay.blade.util.NullProgressMonitor in project liferay-ide by liferay.

the class TrashUndoTagsTest method findProblems.

@Test
public void findProblems() throws Exception {
    ServiceReference<Migration> sr = context.getServiceReference(Migration.class);
    Migration m = context.getService(sr);
    List<Problem> problems = m.findProblems(new File("jsptests/liferay-ui-trash-undo/"), new NullProgressMonitor());
    assertEquals(1, problems.size());
}
Also used : NullProgressMonitor(com.liferay.blade.util.NullProgressMonitor) Migration(com.liferay.blade.api.Migration) Problem(com.liferay.blade.api.Problem) File(java.io.File) Test(org.junit.Test)

Example 3 with NullProgressMonitor

use of com.liferay.blade.util.NullProgressMonitor in project liferay-ide by liferay.

the class CustomAUIValidatorsTagsTest method findProblems.

@Test
public void findProblems() throws Exception {
    ServiceReference<Migration> sr = context.getServiceReference(Migration.class);
    Migration m = context.getService(sr);
    List<Problem> problems = m.findProblems(new File("jsptests/custom-aui-validators/"), new NullProgressMonitor());
    assertEquals(9, problems.size());
    boolean found = false;
    for (Problem problem : problems) {
        if (problem.file.getName().endsWith("CustomAUIValidatorsTest.jsp") && problem.lineNumber == 314 && problem.startOffset >= 11387 && problem.endOffset >= 11393) {
            found = true;
        }
    }
    if (!found) {
        fail();
    }
}
Also used : NullProgressMonitor(com.liferay.blade.util.NullProgressMonitor) Migration(com.liferay.blade.api.Migration) Problem(com.liferay.blade.api.Problem) File(java.io.File) Test(org.junit.Test)

Example 4 with NullProgressMonitor

use of com.liferay.blade.util.NullProgressMonitor in project liferay-ide by liferay.

the class DdmTemplateSelectorTagsTest method findProblems.

@Test
public void findProblems() throws Exception {
    ServiceReference<Migration> sr = context.getServiceReference(Migration.class);
    Migration m = context.getService(sr);
    List<Problem> problems = m.findProblems(new File("jsptests/ddm-template-selector/"), new NullProgressMonitor());
    assertEquals(1, problems.size());
    boolean found = false;
    for (Problem problem : problems) {
        if (problem.file.getName().endsWith("DdmTemplateSelectorTagsTest.jsp")) {
            if (problem.lineNumber == 70 && problem.startOffset >= 2538 && problem.endOffset >= 2549) {
                found = true;
            }
        }
    }
    if (!found) {
        fail();
    }
}
Also used : NullProgressMonitor(com.liferay.blade.util.NullProgressMonitor) Migration(com.liferay.blade.api.Migration) Problem(com.liferay.blade.api.Problem) File(java.io.File) Test(org.junit.Test)

Example 5 with NullProgressMonitor

use of com.liferay.blade.util.NullProgressMonitor in project liferay-ide by liferay.

the class DeprecatedLiferayPortletIconBackTagsTest method findProblems.

@Test
public void findProblems() throws Exception {
    ServiceReference<Migration> sr = context.getServiceReference(Migration.class);
    Migration m = context.getService(sr);
    List<Problem> problems = m.findProblems(new File("jsptests/liferay-portlet-icon-back/"), new NullProgressMonitor());
    assertEquals(1, problems.size());
    boolean found = false;
    for (Problem problem : problems) {
        if (problem.file.getName().endsWith("LiferayPortletIconBack.jsp")) {
            if (problem.lineNumber == 1) {
                found = true;
            }
        }
    }
    if (!found) {
        fail();
    }
}
Also used : NullProgressMonitor(com.liferay.blade.util.NullProgressMonitor) Migration(com.liferay.blade.api.Migration) Problem(com.liferay.blade.api.Problem) File(java.io.File) Test(org.junit.Test)

Aggregations

Migration (com.liferay.blade.api.Migration)26 Problem (com.liferay.blade.api.Problem)26 NullProgressMonitor (com.liferay.blade.util.NullProgressMonitor)26 File (java.io.File)26 Test (org.junit.Test)26 Ignore (org.junit.Ignore)2 AutoMigrator (com.liferay.blade.api.AutoMigrator)1 HashSet (java.util.HashSet)1 ServiceReference (org.osgi.framework.ServiceReference)1