use of com.liferay.blade.api.FileMigrator in project liferay-ide by liferay.
the class BackgroundTaskLegacyAPITest method testFull.
@Test
public void testFull() throws Exception {
FileMigrator fmigrator = context.getService(fileMigrators[0]);
List<Problem> problems = fmigrator.analyze(getTestFile());
context.ungetService(fileMigrators[0]);
assertNotNull(problems);
assertEquals(2, problems.size());
Problem problem = problems.get(0);
assertEquals(18, problem.lineNumber);
if (Util.isWindows()) {
assertEquals(688, problem.startOffset);
assertEquals(736, problem.endOffset);
} else {
assertEquals(671, problem.startOffset);
assertEquals(719, problem.endOffset);
}
problem = problems.get(1);
assertEquals(19, problem.lineNumber);
if (Util.isWindows()) {
assertEquals(746, problem.startOffset);
assertEquals(801, problem.endOffset);
} else {
assertEquals(728, problem.startOffset);
assertEquals(783, problem.endOffset);
}
}
use of com.liferay.blade.api.FileMigrator in project liferay-ide by liferay.
the class IndexerGetFacetQueryTest method indexerWrapperFile.
@Test
public void indexerWrapperFile() throws Exception {
FileMigrator fmigrator = context.getService(fileMigrators[0]);
List<Problem> problems = fmigrator.analyze(indexerWrapper);
context.ungetService(fileMigrators[0]);
assertNotNull(problems);
assertEquals(1, problems.size());
}
use of com.liferay.blade.api.FileMigrator in project liferay-ide by liferay.
the class LockLegacyAPITest method lockLegacyAPITest.
@Test
public void lockLegacyAPITest() throws Exception {
FileMigrator fmigrator = context.getService(fileMigrators[0]);
List<Problem> problems = fmigrator.analyze(getTestFile());
context.ungetService(fileMigrators[0]);
assertNotNull(problems);
assertEquals(4, problems.size());
Problem problem = problems.get(0);
assertEquals(22, problem.lineNumber);
if (Util.isWindows()) {
assertEquals(893, problem.startOffset);
assertEquals(940, problem.endOffset);
} else {
assertEquals(872, problem.startOffset);
assertEquals(919, problem.endOffset);
}
problem = problems.get(1);
assertEquals(46, problem.lineNumber);
if (Util.isWindows()) {
assertEquals(1420, problem.startOffset);
assertEquals(1484, problem.endOffset);
} else {
assertEquals(1375, problem.startOffset);
assertEquals(1438, problem.endOffset);
}
problem = problems.get(2);
assertEquals(62, problem.lineNumber);
if (Util.isWindows()) {
assertEquals(1747, problem.startOffset);
assertEquals(1806, problem.endOffset);
} else {
assertEquals(1686, problem.startOffset);
assertEquals(1745, problem.endOffset);
}
problem = problems.get(3);
assertEquals(73, problem.lineNumber);
if (Util.isWindows()) {
assertEquals(1971, problem.startOffset);
assertEquals(2044, problem.endOffset);
} else {
assertEquals(1899, problem.startOffset);
assertEquals(1971, problem.endOffset);
}
}
use of com.liferay.blade.api.FileMigrator in project liferay-ide by liferay.
the class MVCPortletClassInPortletXMLTest method testPortletXmlFileLineNumbers.
@Test
public void testPortletXmlFileLineNumbers() throws Exception {
assertNotNull(fileMigrators[0]);
FileMigrator fmigrator = context.getService(fileMigrators[0]);
List<Problem> problems = fmigrator.analyze(getTestFile());
assertEquals(7, problems.get(0).lineNumber);
assertEquals(37, problems.get(1).lineNumber);
}
use of com.liferay.blade.api.FileMigrator in project liferay-ide by liferay.
the class ConfigurationActionRenderMethodTest method editConfigurationActionFile.
@Test
public void editConfigurationActionFile() throws Exception {
FileMigrator fmigrator = context.getService(fileMigrators[0]);
List<Problem> problems = fmigrator.analyze(editConfigurationActionFile);
context.ungetService(fileMigrators[0]);
assertNotNull(problems);
assertEquals(1, problems.size());
}
Aggregations