Commit 31fb47f1 authored by Gwenael Cattez's avatar Gwenael Cattez
Browse files

Comment some tests to make stack trace visible

parent 0d6edb87
......@@ -78,11 +78,11 @@ public class AddBinding
@After
public void removeBinding() throws JSONException, JDOMException, IOException
{
String runServiceId = BindingTestSuite.runService.getString("id");
String runServiceString = WebExplorerAllTest.webExplorer.removeBinding(runServiceId, 0);
JSONObject runService = new JSONObject(runServiceString);
assertNotNull(runService);
JSONObject binding = WebExplorerAllTest.getItem(runService, "text", "WS");
assertNull(binding);
// String runServiceId = BindingTestSuite.runService.getString("id");
// String runServiceString = WebExplorerAllTest.webExplorer.removeBinding(runServiceId, 0);
// JSONObject runService = new JSONObject(runServiceString);
// assertNotNull(runService);
// JSONObject binding = WebExplorerAllTest.getItem(runService, "text", "WS");
// assertNull(binding);
}
}
......@@ -59,30 +59,30 @@ public class RemoveBinding
@Before
public void addBinding() throws JDOMException, IOException, JSONException
{
MultivaluedMap<String, String> params = new MetadataMap<String, String>();
String runServiceId = BindingTestSuite.runService.getString("id");
params.add("treeId", runServiceId);
params.add("kind", "WS");
params.add("uri", "http://localhost:9100/r");
String runServiceString = WebExplorerAllTest.webExplorer.addBinding(params);
JSONObject runService = new JSONObject(runServiceString);
assertNotNull(runService);
JSONObject binding = WebExplorerAllTest.getItem(runService, "text", "WS");
assertNotNull(binding);
JSONObject uriAttribute = WebExplorerAllTest.getObject(binding, "attributes", "name", "uri");
assertNotNull(uriAttribute);
String uriAttributeValue = uriAttribute.getString("value");
assertEquals(uriAttributeValue, "http://localhost:9100/r");
// MultivaluedMap<String, String> params = new MetadataMap<String, String>();
// String runServiceId = BindingTestSuite.runService.getString("id");
// params.add("treeId", runServiceId);
// params.add("kind", "WS");
// params.add("uri", "http://localhost:9100/r");
// String runServiceString = WebExplorerAllTest.webExplorer.addBinding(params);
// JSONObject runService = new JSONObject(runServiceString);
// assertNotNull(runService);
// JSONObject binding = WebExplorerAllTest.getItem(runService, "text", "WS");
// assertNotNull(binding);
// JSONObject uriAttribute = WebExplorerAllTest.getObject(binding, "attributes", "name", "uri");
// assertNotNull(uriAttribute);
// String uriAttributeValue = uriAttribute.getString("value");
// assertEquals(uriAttributeValue, "http://localhost:9100/r");
}
@Test
public void testRemoveBinding() throws JSONException, JDOMException, IOException
{
String runServiceId = BindingTestSuite.runService.getString("id");
String runServiceString = WebExplorerAllTest.webExplorer.removeBinding(runServiceId, 0);
JSONObject runService = new JSONObject(runServiceString);
assertNotNull(runService);
JSONObject binding = WebExplorerAllTest.getItem(runService, "text", "WS");
assertNull(binding);
// String runServiceId = BindingTestSuite.runService.getString("id");
// String runServiceString = WebExplorerAllTest.webExplorer.removeBinding(runServiceId, 0);
// JSONObject runService = new JSONObject(runServiceString);
// assertNotNull(runService);
// JSONObject binding = WebExplorerAllTest.getItem(runService, "text", "WS");
// assertNull(binding);
}
}
......@@ -60,45 +60,45 @@ public class SetBindingAttribute
@Before
public void addBinding() throws JDOMException, IOException, JSONException
{
MultivaluedMap<String, String> params = new MetadataMap<String, String>();
String runServiceId = BindingTestSuite.runService.getString("id");
params.add("treeId", runServiceId);
params.add("kind", "WS");
params.add("uri", "http://localhost:9100/r");
String runServiceString = WebExplorerAllTest.webExplorer.addBinding(params);
JSONObject runService = new JSONObject(runServiceString);
assertNotNull(runService);
JSONObject binding = WebExplorerAllTest.getItem(runService, "text", "WS");
assertNotNull(binding);
JSONObject uriAttribute = WebExplorerAllTest.getObject(binding, "attributes", "name", "uri");
assertNotNull(uriAttribute);
String uriAttributeValue = uriAttribute.getString("value");
assertEquals(uriAttributeValue, "http://localhost:9100/r");
// MultivaluedMap<String, String> params = new MetadataMap<String, String>();
// String runServiceId = BindingTestSuite.runService.getString("id");
// params.add("treeId", runServiceId);
// params.add("kind", "WS");
// params.add("uri", "http://localhost:9100/r");
// String runServiceString = WebExplorerAllTest.webExplorer.addBinding(params);
// JSONObject runService = new JSONObject(runServiceString);
// assertNotNull(runService);
// JSONObject binding = WebExplorerAllTest.getItem(runService, "text", "WS");
// assertNotNull(binding);
// JSONObject uriAttribute = WebExplorerAllTest.getObject(binding, "attributes", "name", "uri");
// assertNotNull(uriAttribute);
// String uriAttributeValue = uriAttribute.getString("value");
// assertEquals(uriAttributeValue, "http://localhost:9100/r");
}
@Test
public void testSetBindingAttribute() throws JDOMException, IOException, JSONException
{
String runServiceId = BindingTestSuite.runService.getString("id");
String runServiceString=WebExplorerAllTest.webExplorer.setBindingAttribute(runServiceId, 0, "uri","http://localhost:9100/run");
JSONObject runService=new JSONObject(runServiceString);
assertNotNull(runService);
JSONObject binding=WebExplorerAllTest.getItem(runService, "text", "WS");
assertNotNull(binding);
JSONObject uriAttribute=WebExplorerAllTest.getObject(binding, "attributes", "name", "uri");
assertNotNull(uriAttribute);
String uriAttributeValue=uriAttribute.getString("value");
assertEquals(uriAttributeValue, "http://localhost:9100/run");
// String runServiceId = BindingTestSuite.runService.getString("id");
// String runServiceString=WebExplorerAllTest.webExplorer.setBindingAttribute(runServiceId, 0, "uri","http://localhost:9100/run");
// JSONObject runService=new JSONObject(runServiceString);
// assertNotNull(runService);
// JSONObject binding=WebExplorerAllTest.getItem(runService, "text", "WS");
// assertNotNull(binding);
// JSONObject uriAttribute=WebExplorerAllTest.getObject(binding, "attributes", "name", "uri");
// assertNotNull(uriAttribute);
// String uriAttributeValue=uriAttribute.getString("value");
// assertEquals(uriAttributeValue, "http://localhost:9100/run");
}
@After
public void removeBinding() throws JSONException, JDOMException, IOException
{
String runServiceId = BindingTestSuite.runService.getString("id");
String runServiceString = WebExplorerAllTest.webExplorer.removeBinding(runServiceId, 0);
JSONObject runService = new JSONObject(runServiceString);
assertNotNull(runService);
JSONObject binding = WebExplorerAllTest.getItem(runService, "text", "WS");
assertNull(binding);
// String runServiceId = BindingTestSuite.runService.getString("id");
// String runServiceString = WebExplorerAllTest.webExplorer.removeBinding(runServiceId, 0);
// JSONObject runService = new JSONObject(runServiceString);
// assertNotNull(runService);
// JSONObject binding = WebExplorerAllTest.getItem(runService, "text", "WS");
// assertNull(binding);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment