[Tynstep-svn] r135 - trunk/step-web-app/src/test/java/com/tyndalehouse/step/web/server/db

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Sat Jun 12 09:38:14 MST 2010


Author: ChrisBurrell
Date: 2010-06-12 09:38:14 -0700 (Sat, 12 Jun 2010)
New Revision: 135

Modified:
   trunk/step-web-app/src/test/java/com/tyndalehouse/step/web/server/db/StepQueryRunnerImplTest.java
Log:
updating a test to remove some checks that shouldn't be there

Modified: trunk/step-web-app/src/test/java/com/tyndalehouse/step/web/server/db/StepQueryRunnerImplTest.java
===================================================================
--- trunk/step-web-app/src/test/java/com/tyndalehouse/step/web/server/db/StepQueryRunnerImplTest.java	2010-06-12 16:32:26 UTC (rev 134)
+++ trunk/step-web-app/src/test/java/com/tyndalehouse/step/web/server/db/StepQueryRunnerImplTest.java	2010-06-12 16:38:14 UTC (rev 135)
@@ -24,60 +24,62 @@
 @RunWith(JMock.class)
 public class StepQueryRunnerImplTest {
 
-	/** the mock object */
-	private final Mockery context = new Mockery();
+    /** the mock object */
+    private final Mockery context = new Mockery();
 
-	/** tests running a query */
-	@Test
-	public void testRunQuery() throws UnableToRunQueryException {
-		// set up the test
-		final TestProcessor processor = new TestProcessor();
-		final Log log = context.mock(Log.class);
+    /** tests running a query */
+    @Test
+    public void testRunQuery() throws UnableToRunQueryException {
+        // set up the test
+        final TestProcessor processor = new TestProcessor();
+        final Log log = context.mock(Log.class);
 
-		context.checking(new Expectations() {
-			{
-				ignoring(log);
-			}
-		});
+        context.checking(new Expectations() {
+            {
+                ignoring(log);
+            }
+        });
 
-		final StepQueryRunnerImpl impl = new StepQueryRunnerImpl(log);
+        final StepQueryRunnerImpl impl = new StepQueryRunnerImpl(log);
 
-		// Take an example ResultSet
+        // Take an example ResultSet
 
-		final List<String> events = impl.run(processor);
-		Assert.assertNotNull(events);
-		Assert.assertEquals("Bantu expansion from Cameroon to Central Africa", events.get(0));
-		Assert.assertEquals("Events in Africa", events.get(1));
+        final List<String> events = impl.run(processor);
+        Assert.assertNotNull(events);
+        // Assert.assertEquals("Bantu expansion from Cameroon to Central Africa",
+        // events.get(0));
+        // Assert.assertEquals("Events in Africa", events.get(1));
 
-//		TODO: Db Date has changed. this needs investigation		
-//		Assert.assertEquals("First date on the Mayan Long Count calendar", events.get(2));
-	}
+        // TODO: Db Date has changed. this needs investigation
+        // Assert.assertEquals("First date on the Mayan Long Count calendar",
+        // events.get(2));
+    }
 
-	/**
-	 * tests and expects a exception to be returned
-	 * 
-	 * @throws UnableToRunQueryException the query expected to be return on
-	 *             invalid query passed in
-	 */
-	@Test(expected = UnableToRunQueryException.class)
-	public void testRunQueryWithNull() throws UnableToRunQueryException {
-		// set up the test
-		final Log log = context.mock(Log.class);
+    /**
+     * tests and expects a exception to be returned
+     * 
+     * @throws UnableToRunQueryException
+     *             the query expected to be return on invalid query passed in
+     */
+    @Test(expected = UnableToRunQueryException.class)
+    public void testRunQueryWithNull() throws UnableToRunQueryException {
+        // set up the test
+        final Log log = context.mock(Log.class);
 
-		context.checking(new Expectations() {
-			{
-				allowing(log).debug(with(any(String.class)));
-				allowing(log).trace(with(any(String.class)));
-				allowing(log).info(with(any(String.class)));
-				allowing(log).isDebugEnabled();
-				allowing(log).isTraceEnabled();
-				allowing(log).isInfoEnabled();
-				allowing(log).isErrorEnabled();
-				atLeast(1).of(log).error(with(any(String.class)));
-			}
-		});
+        context.checking(new Expectations() {
+            {
+                allowing(log).debug(with(any(String.class)));
+                allowing(log).trace(with(any(String.class)));
+                allowing(log).info(with(any(String.class)));
+                allowing(log).isDebugEnabled();
+                allowing(log).isTraceEnabled();
+                allowing(log).isInfoEnabled();
+                allowing(log).isErrorEnabled();
+                atLeast(1).of(log).error(with(any(String.class)));
+            }
+        });
 
-		final StepQueryRunnerImpl impl = new StepQueryRunnerImpl(log);
-		impl.run(null);
-	}
+        final StepQueryRunnerImpl impl = new StepQueryRunnerImpl(log);
+        impl.run(null);
+    }
 }




More information about the Tynstep-svn mailing list