@@ -0,0 +1,1104 @@
+package beaform.search;%0A%0Aimport java.util.List;%0Aimport java.util.concurrent.Callable;%0A%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport beaform.dao.GraphDbHandlerForJTA;%0Aimport beaform.debug.DebugUtils;%0Aimport beaform.entities.Formula;%0Aimport junit.framework.TestCase;%0A%0A/**%0A * Tests for searching formulas by tag.%0A *%0A * @author Steven Post%0A *%0A */%0Apublic class SearchFormulasByTagTaskTest extends TestCase %7B%0A%0A%09/**%0A%09 * %7B@inheritDoc%7D%0A%09 */%0A%09@Override%0A%09@Before%0A%09public void setUp() %7B%0A%09%09GraphDbHandlerForJTA.initInstance(%22test%22);%0A%09%09DebugUtils.clearDb();%0A%09%09DebugUtils.fillDb();%0A%09%7D%0A%0A%09/**%0A%09 * Test the search method.%0A%09 * @throws Exception%0A%09 */%0A%09@Test%0A%09public void testSearch() throws Exception %7B%0A%09%09final Callable%3CList%3CFormula%3E%3E task = new SearchFormulasByTagTask(%22First%22);%0A%09%09final List%3CFormula%3E resultList = task.call();%0A%09%09for (final Formula form : resultList) %7B%0A%09%09%09assertTrue(%22This formula doesn't match the search criteria%22, form.getTagsAsStrings().contains(%22First%22));%0A%09%09%7D%0A%09%7D%0A%0A%09/**%0A%09 * %7B@inheritDoc%7D%0A%09 */%0A%09@Override%0A%09@After%0A%09public void tearDown() %7B%0A%09%09DebugUtils.clearDb();%0A%09%7D%0A%0A%7D%0A

Add a test for searching by tags