[teiid-commits] teiid SVN: r2562 - branches/7.1.x/runtime/src/test/java/org/teiid/dqp/service/buffer.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Mon Sep 13 15:14:48 EDT 2010


Author: shawkins
Date: 2010-09-13 15:14:47 -0400 (Mon, 13 Sep 2010)
New Revision: 2562

Modified:
   branches/7.1.x/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java
Log:
TEIID-1257 removing directory creation from setter method

Modified: branches/7.1.x/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java
===================================================================
--- branches/7.1.x/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java	2010-09-13 17:53:46 UTC (rev 2561)
+++ branches/7.1.x/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java	2010-09-13 19:14:47 UTC (rev 2562)
@@ -22,31 +22,19 @@
 
 package org.teiid.dqp.service.buffer;
 
+import static org.junit.Assert.*;
+
+import org.junit.Test;
 import org.teiid.common.buffer.impl.BufferManagerImpl;
 import org.teiid.common.buffer.impl.FileStorageManager;
 import org.teiid.core.util.UnitTestUtil;
 import org.teiid.services.BufferServiceImpl;
 
-import junit.framework.TestCase;
-
 @SuppressWarnings("nls")
-public class TestLocalBufferService extends TestCase {
+public class TestLocalBufferService {
 
-    public TestLocalBufferService(String name) {
-        super(name);
-    }
-
-    public void testMissingRequiredProperties() throws Exception {        
+    @Test public void testCheckMemPropertyGotSet() throws Exception {
         BufferServiceImpl svc = new BufferServiceImpl();
-        svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid");
-
-        // These are defaults if none of the properties are set.
-        assertTrue(svc.getBufferDirectory().isDirectory() && svc.getBufferDirectory().exists());
-        assertTrue(svc.isUseDisk());
-    }
-    
-    public void testCheckMemPropertyGotSet() throws Exception {
-        BufferServiceImpl svc = new BufferServiceImpl();
         svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid/1");
         svc.setUseDisk(true);
         
@@ -61,7 +49,7 @@
         assertTrue(((FileStorageManager)mgr.getStorageManager()).getDirectory().endsWith(svc.getBufferDirectory().getName()));
     }
 
-    public void testCheckMemPropertyGotSet2() throws Exception {
+    @Test public void testCheckMemPropertyGotSet2() throws Exception {
         BufferServiceImpl svc = new BufferServiceImpl();
         svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid/1");
         svc.setUseDisk(false);



More information about the teiid-commits mailing list