--- /dev/null
+/*-\r
+ * ============LICENSE_START=======================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ============LICENSE_END=========================================================\r
+ */\r
+\r
+package com.woorea.openstack.nova.model;\r
+\r
+import com.woorea.openstack.nova.model.ServerAction.ChangePassword;\r
+import org.junit.Test;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+import static org.junit.Assert.fail; \r
+\r
+\r
+public class ServerActionTest {\r
+ private ChangePassword testObj = new ServerAction.ChangePassword();\r
+\r
+ @Test\r
+ public void testSetAdminPass(){\r
+\r
+ try {\r
+\r
+ testObj.setAdminPass("sai");\r
+ assertEquals( testObj.getAdminPass(), "sai");\r
+\r
+ } catch (Exception e) {\r
+\r
+ fail("Exception in test obj");\r
+ }\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testChangePasswdConstructor(){\r
+\r
+ try {\r
+ ServerAction.ChangePassword test = new ServerAction.ChangePassword("sai");\r
+ assertEquals( test.getAdminPass(), "sai");\r
+\r
+ } catch (Exception e) {\r
+\r
+ fail("Exception in test obj");\r
+ }\r
+\r
+ }\r
+\r
+ private ServerAction.Reboot testObj1 = new ServerAction.Reboot();\r
+\r
+ @Test\r
+ public void testSetType(){\r
+ testObj1.setType("sai");\r
+ assertEquals("sai", testObj1.getType());\r
+ }\r
+\r
+ private ServerAction.Rebuild testRebuild = new ServerAction.Rebuild();\r
+ \r
+ @Test\r
+ public void testRebuild()\r
+ {\r
+ testRebuild.setAccessIPv4("1.1.1.1");\r
+ assertEquals(testRebuild.getAccessIPv4(),"1.1.1.1");\r
+ }\r
+}\r