use of com.liferay.blade.api.Migration in project liferay-ide by liferay.
the class AssetCategoriesNavigationTagsTest 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/asset-categories-navigation/"), new NullProgressMonitor());
assertEquals(1, problems.size());
boolean found = false;
for (Problem problem : problems) {
if (problem.file.getName().endsWith("AssetCategoriesNavigationTagsTest.jsp")) {
if (problem.lineNumber == 48 && problem.startOffset >= 1530 && problem.endOffset >= 1616) {
found = true;
}
}
}
if (!found) {
fail();
}
}
use of com.liferay.blade.api.Migration in project liferay-ide by liferay.
the class AssetPreviewTagsTest 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/asset-preview/"), new NullProgressMonitor());
assertEquals(1, 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 EmptyFileCheckingTest 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("projects/emptyfiles/"), new NullProgressMonitor());
assertEquals(0, problems.size());
}
use of com.liferay.blade.api.Migration in project liferay-ide by liferay.
the class AUIButtonItemTagsTest 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/aui-button/"), new NullProgressMonitor());
assertEquals(2, problems.size());
boolean found = false;
for (Problem problem : problems) {
if (problem.file.getName().endsWith("AUIButtonItemTagTest.jsp")) {
if (problem.lineNumber == 3 && problem.startOffset >= 94 && problem.endOffset >= 129) {
found = true;
}
}
}
if (!found) {
fail();
}
}
use of com.liferay.blade.api.Migration in project liferay-ide by liferay.
the class AUIColumnTagsTest 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/aui-column/"), new NullProgressMonitor());
assertEquals(2, problems.size());
boolean found = false;
for (Problem problem : problems) {
if (problem.file.getName().endsWith("AUIColumnTagTest.jsp")) {
if (problem.lineNumber == 2 && problem.startOffset >= 58 && problem.endOffset >= 461) {
found = true;
}
}
}
if (!found) {
fail();
}
}
Aggregations