Updated Branches:
  refs/heads/junit-tests 77d74c65d -> c3fafec8c

Adding api/unittest files
Signed-off-by: Chip Childers <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/c3fafec8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/c3fafec8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/c3fafec8

Branch: refs/heads/junit-tests
Commit: c3fafec8c0f75b0a6cfc724ac18fc1bd4364eb88
Parents: 1ea6b11
Author: Yichi Lu <[email protected]>
Authored: Mon Sep 24 11:19:47 2012 -0400
Committer: Chip Childers <[email protected]>
Committed: Mon Sep 24 11:19:47 2012 -0400

----------------------------------------------------------------------
 api/unittest/.gitignore                            |    1 +
 api/unittest/pom.xml                               |   78 +++++++++++++++
 api/unittest/src/com/cloud/agent/api/.gitignore    |   15 +++
 .../com/cloud/agent/api/AttachIsoCommandTest.java  |   17 +++
 4 files changed, 111 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c3fafec8/api/unittest/.gitignore
----------------------------------------------------------------------
diff --git a/api/unittest/.gitignore b/api/unittest/.gitignore
new file mode 100644
index 0000000..eb5a316
--- /dev/null
+++ b/api/unittest/.gitignore
@@ -0,0 +1 @@
+target

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c3fafec8/api/unittest/pom.xml
----------------------------------------------------------------------
diff --git a/api/unittest/pom.xml b/api/unittest/pom.xml
new file mode 100644
index 0000000..8774191
--- /dev/null
+++ b/api/unittest/pom.xml
@@ -0,0 +1,78 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.cloudstack</groupId>
+  <artifactId>cloud-api-unittest</artifactId>
+  <name>Apache CloudStack API Unittest</name>
+  <version>4.0.0-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-utils</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.8.2</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.cloudstack</groupId>
+        <artifactId>cloud-api-unittest</artifactId>
+        <version>4.0.0-SNAPSHOT</version>
+        <configuration>
+          <includes>
+            <include>../src/com/cloud/agent/api/*.java</include>
+          </includes>
+        </configuration>
+      </plugin>
+    </plugins>
+    <sourceDirectory>../src/com/cloud/agent/api</sourceDirectory>
+    <testSourceDirectory>src/com/cloud/agent/api</testSourceDirectory>
+    <testOutputDirectory>src/com/cloud/agent/api</testOutputDirectory>
+<!--
+    <testSourceDirectory>target/test-classes</testSourceDirectory>
+    <testOutputDirectory>target/test-classes</testOutputDirectory>
+-->
+    <testResources>
+      <testResource>
+<!--
+        <directory>src/com/cloud/agent/api</directory>
+-->
+        <directory>target/test-classes</directory>
+      </testResource>
+    </testResources>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c3fafec8/api/unittest/src/com/cloud/agent/api/.gitignore
----------------------------------------------------------------------
diff --git a/api/unittest/src/com/cloud/agent/api/.gitignore 
b/api/unittest/src/com/cloud/agent/api/.gitignore
new file mode 100644
index 0000000..991a3b6
--- /dev/null
+++ b/api/unittest/src/com/cloud/agent/api/.gitignore
@@ -0,0 +1,15 @@
+*.class
+*.jar
+*.pom
+*.properties
+*.repositories
+*.sha1
+*.xml
+META-INF/
+baremetal/
+check/
+com/
+proxy/
+routing/
+storage/
+to/

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c3fafec8/api/unittest/src/com/cloud/agent/api/AttachIsoCommandTest.java
----------------------------------------------------------------------
diff --git a/api/unittest/src/com/cloud/agent/api/AttachIsoCommandTest.java 
b/api/unittest/src/com/cloud/agent/api/AttachIsoCommandTest.java
new file mode 100644
index 0000000..638ae29
--- /dev/null
+++ b/api/unittest/src/com/cloud/agent/api/AttachIsoCommandTest.java
@@ -0,0 +1,17 @@
+package com.cloud.agent.api;
+
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import com.cloud.agent.api.*;
+
+public class AttachIsoCommandTest {
+
+       @Test
+       public void testGetVmName() {
+               AttachIsoCommand aic = new AttachIsoCommand("x", "y", false);
+               String vmName = aic.getVmName();
+               assertTrue(vmName.equals("x"));
+       }
+
+}

Reply via email to