Unit test stubs added.

This commit is contained in:
Zhen Tang 2013-06-17 16:34:09 +08:00
parent d716645fd5
commit f03c368b48
25 changed files with 171 additions and 62 deletions

43
pom.xml
View File

@ -30,6 +30,11 @@
<artifactId>spring-webmvc</artifactId>
<version>3.2.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.2.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
@ -45,7 +50,6 @@
<artifactId>hibernate-core</artifactId>
<version>4.3.0.Beta3</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
@ -67,48 +71,11 @@
<artifactId>hadoop-tools</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils-core</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>com.yahoo.oozie</groupId>
<artifactId>oozie-client</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-examples</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.2.3.RELEASE</version>
</dependency>
</dependencies>
<profiles></profiles>

View File

@ -24,10 +24,6 @@ public class ClusterConfiguration {
}
public ClusterConfiguration() {
this.loadClusterConf();
}
private void loadClusterConf() {
ClassLoader loader = ClusterConfiguration.class.getClassLoader();
URL url = loader.getResource(ClusterConfiguration.PROERTIES_FILE_NAME);
this.setProperties(new Properties());

View File

@ -19,7 +19,7 @@
<mapping class="haflow.entity.Flow" />
<mapping class="haflow.entity.Node" />
<mapping class="haflow.profile.NodeAppearanceProfile" />
<mapping class="haflow.profile.NodeConfigurationProfile" />
<mapping class="haflow.profile.NodeAppearance" />
<mapping class="haflow.profile.NodeConfiguration" />
</session-factory>
</hibernate-configuration>

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class ClusterConfigurationTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class FlowControllerTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class FlowDeployServiceTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class FlowExecuteServiceTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -1,5 +1,9 @@
package haflow.test;
public class FlowHelperTest {
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class FlowHelperTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -1,5 +1,9 @@
package haflow.test;
public class FlowServiceTest {
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class FlowServiceTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class HdfsControllerTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class HdfsHelperTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -1,5 +1,9 @@
package haflow.test;
public class HdfsServiceTest {
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class HdfsServiceTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class HomeControllerTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class ModuleControllerTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -1,5 +1,9 @@
package haflow.test;
public class ModuleHelperTest {
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class ModuleHelperTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class ModuleLoaderTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -1,5 +1,9 @@
package haflow.test;
public class ModuleServiceTest {
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class ModuleServiceTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -1,5 +0,0 @@
package haflow.test;
public class NodeAppearanceProfilesServiceTest {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class NodeAppearanceServiceTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -1,5 +0,0 @@
package haflow.test;
public class NodeConfigurationProfileServiceTest {
}

View File

@ -0,0 +1,10 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class NodeConfigurationServiceTest extends
AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class OozieServiceTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class RunControllerTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class RunHelperTest extends AbstractJUnit4SpringContextTests {
}

View File

@ -0,0 +1,9 @@
package haflow.test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = "classpath:servlet-context.xml")
public class SessionHelperTest extends AbstractJUnit4SpringContextTests {
}