use of com.liferay.blade.api.Problem in project liferay-ide by liferay.
the class APITestBase method test.
@Test
public void test() throws Exception {
FileMigrator fmigrator = context.getService(fileMigrators[0]);
List<Problem> problems = fmigrator.analyze(getTestFile());
context.ungetService(fileMigrators[0]);
assertNotNull(problems);
assertEquals(getExpectedNumber(), problems.size());
}
use of com.liferay.blade.api.Problem in project liferay-ide by liferay.
the class ActionCommandImportsTest method sayHelloActionCommandFile2.
@Test
public void sayHelloActionCommandFile2() throws Exception {
FileMigrator fmigrator = context.getService(fileMigrators[0]);
List<Problem> problems = fmigrator.analyze(sayHelloActionCommandFile2);
context.ungetService(fileMigrators[0]);
assertNotNull(problems);
assertEquals(2, problems.size());
}
use of com.liferay.blade.api.Problem 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();
}
}
use of com.liferay.blade.api.Problem 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();
}
}
use of com.liferay.blade.api.Problem 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();
}
}
Aggregations