use of com.liferay.blade.api.Migration in project liferay-ide by liferay.
the class PortletIconTagsTest 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/portlet-icon/"), new NullProgressMonitor());
assertEquals(13, problems.size());
}
use of com.liferay.blade.api.Migration in project liferay-ide by liferay.
the class AllJSPTagProblemsTest method allProblems.
@Ignore
@Test
public void allProblems() throws Exception {
ServiceReference<Migration> sr = context.getServiceReference(Migration.class);
Migration m = context.getService(sr);
List<Problem> problems = m.findProblems(new File("jsptests/"), new NullProgressMonitor());
final int expectedSize = 59;
final int size = problems.size();
if (size != expectedSize) {
System.err.println("All problems size is " + size + ", expected size is " + expectedSize);
}
assertEquals(expectedSize, size);
}
use of com.liferay.blade.api.Migration in project liferay-ide by liferay.
the class AppViewSearchEntryTagsTest 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/app-view-search-entry/"), new NullProgressMonitor());
assertEquals(3, problems.size());
}
use of com.liferay.blade.api.Migration in project liferay-ide by liferay.
the class FileSetMigrationTest method findProblemsOnJustFileSet.
@Test
public void findProblemsOnJustFileSet() throws Exception {
ServiceReference<Migration> sr = context.getServiceReference(Migration.class);
Migration m = context.getService(sr);
Set<File> fileset = new HashSet<>();
fileset.add(new File("jsptests/app-view-search-entry/AppViewSearchEntryTagsTest.jsp"));
fileset.add(new File("jsptests/asset-preview/AssetPreviewTest.jsp"));
List<Problem> problems = m.findProblems(fileset, new NullProgressMonitor());
assertEquals(4, problems.size());
boolean found = false;
for (Problem problem : problems) {
if (problem.file.getName().endsWith("AssetPreviewTest.jsp") && problem.lineNumber == 7 && problem.startOffset >= 230 && problem.endOffset >= 310) {
found = true;
}
}
if (!found) {
fail();
}
}
use of com.liferay.blade.api.Migration in project liferay-ide by liferay.
the class InitJSPParseTest method initParseErrorCheck.
@Test
public void initParseErrorCheck() throws Exception {
ServiceReference<Migration> sr = context.getServiceReference(Migration.class);
Migration m = context.getService(sr);
List<Problem> problems = m.findProblems(new File("jsptests/jukebox-portlet/"), new NullProgressMonitor());
assertEquals(327, problems.size());
boolean found = false;
for (Problem problem : problems) {
if (problem.file.getName().endsWith("view_search.jsp")) {
if (problem.lineNumber == 109) {
found = true;
}
}
}
if (!found) {
fail();
}
}
Aggregations