@Test public void testServiceUpgrade() throws UnsupportedEncodingException { MoPaaSInVo in = new MoPaaSInVo(); in.setMethod("GET"); in.setUri("/api/v2/service/mysql0626/75/upgrade"); MoPaaSOutVo out = client.exec(in, MoPaaSOutVo.class); Assert.assertEquals("API_0", out.getCode()); }
@Test public void testServiceDelete() { MoPaaSInVo in = new MoPaaSInVo(); in.setMethod("DELETE"); in.setUri("/api/v2/service/mysql0626"); MoPaaSOutVo out = client.exec(in, MoPaaSOutVo.class); Assert.assertEquals("API_0", out.getCode()); }
@Test public void testServiceUnbind() { MoPaaSInVo in = new MoPaaSInVo(); in.setMethod("GET"); in.setUri("/api/v2/service/php0609/mysql0626/unbind"); MoPaaSOutVo out = client.exec(in, MoPaaSOutVo.class); Assert.assertEquals("API_0", out.getCode()); }
@Test public void testServicePlanList() { MoPaaSInVo in = new MoPaaSInVo(); in.setMethod("GET"); in.setUri("/api/v2/service/plan/MySQL/list"); MoPaaSOutVo out = client.exec(in, MoPaaSOutVo.class); Assert.assertEquals("API_0", out.getCode()); Assert.assertNotNull(out.getList()); Assert.assertNull(out.getResult()); }
@Test public void testServiceCredentials() { MoPaaSInVo in = new MoPaaSInVo(); in.setMethod("GET"); in.setUri( "/api/v2/service/dd2ce6bd-b6ad-4250-93dd-4a8ff76a24ff/fc894f51-00cd-4114-a7c1-0547b81e77bc/credentials"); MoPaaSOutVo out = client.exec(in, MoPaaSOutVo.class); Assert.assertEquals("API_0", out.getCode()); Assert.assertNull(out.getList()); Assert.assertNotNull(out.getResult()); }