package blade.migrate.test;

import static org.junit.Assert.assertEquals;

import blade.migrate.api.Migration;
import blade.migrate.api.Problem;

import java.io.File;
import java.util.List;

import org.junit.Test;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.ServiceReference;

public class AllProblemsTest {

	@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(
						"../blade.migrate.liferay70/projects/"));

		assertEquals(190, problems.size());
	}

	private final BundleContext context = FrameworkUtil.getBundle(
		this.getClass()).getBundleContext();

}

@@ -656,41 +656,237 @@
 %0A%0A%09%09
-assertEquals(190, problems.size()
+final int expectedSize = 178;%0A%09%09final int size = problems.size();%0A%0A%09%09if (size != expectedSize) %7B%0A%09%09%09System.err.println(%22All problems size is %22 + size + %22, expected size is %22 + expectedSize);%0A%09%09%7D%0A%0A%09%09assertEquals(expectedSize, size
 );%0A%09

after fixed jsp searcher problem count is 178