axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r368023 - /webservices/axis2/trunk/c/test/core/description/test_description.c
Date Wed, 11 Jan 2006 13:29:28 GMT
Author: damitha
Date: Wed Jan 11 05:29:22 2006
New Revision: 368023

URL: http://svn.apache.org/viewcvs?rev=368023&view=rev
Log:
added testcases for some methods

Modified:
    webservices/axis2/trunk/c/test/core/description/test_description.c

Modified: webservices/axis2/trunk/c/test/core/description/test_description.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/description/test_description.c?rev=368023&r1=368022&r2=368023&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/description/test_description.c (original)
+++ webservices/axis2/trunk/c/test/core/description/test_description.c Wed Jan 11 05:29:22
2006
@@ -3,16 +3,18 @@
 #include <axis2_module_desc.h>
 #include <axis2_phases_info.h>
 #include <axis2_env.h>
+#include <axis2_allocator.h>
 
 struct axis2_module_desc *create_module_desc(axis2_env_t **env);
 
 int axis2_test_op_engage_module()
 {
+	struct axis2_op *op = axis2_op_create(&env);
+    struct axis2_module_desc *moduleref= NULL;
+
 	axis2_status_t status = AXIS2_FAILURE;
     axis2_allocator_t *allocator = axis2_allocator_init (NULL);
 	axis2_env_t *env = axis2_env_create (allocator);
-	struct axis2_op *op = axis2_op_create(&env);
-    struct axis2_module_desc *moduleref= NULL;
 
     moduleref = axis2_module_desc_create(&env);
 
@@ -25,12 +27,80 @@
 	}
 
 	AXIS2_OP_FREE(op, &env);
+	AXIS2_MODULE_DESC_FREE(moduleref, &env);
 	axis2_env_free(env);
     return 0;
 }
+int axis2_test_svc_add_module_ops()
+{
+	struct axis2_svc *svc = NULL;
+	struct axis2_qname *qname = NULL;
+    struct axis2_module_desc *module_desc = NULL;
+	struct axis2_conf *axis2_config = NULL;
+
+	axis2_status_t status = AXIS2_FAILURE;
+
+	axis2_allocator_t *allocator = axis2_allocator_init (NULL);
+	axis2_env_t *env = axis2_env_create (allocator);
+	
+	qname = axis2_qname_create(&env, "name1", NULL, NULL);
+	svc = axis2_svc_create_with_qname(&env, qname);
+	module_desc = axis2_module_desc_create(&env);
+	axis2_config = axis2_conf_create(&env);
+	status = axis2_svc_add_module_ops(svc, &env, module_desc, axis2_config);
+	if(status != AXIS2_SUCCESS)
+	{
+	    printf("axis2_test_description_add_module_ops ERROR %d\n", status);
+	}
+	else
+	    printf("axis2_test_add_module_ops SUCCESS\n");
+
+	AXIS2_SVC_FREE(svc, &env);
+	AXIS2_QNAME_FREE(qname, &env);
+	AXIS2_MODULE_DESC_FREE(module_desc, &env);
+	AXIS2_CONF_FREE(axis2_config, &env);
+	
+	return 0;
+}
+
+int axis2_test_svc_engage_module()
+{
+	struct axis2_svc *svc = NULL;
+	struct axis2_qname *qname = NULL;
+	struct axis2_module_desc *moduleref = NULL;
+	struct axis2_conf *axis2_config = NULL;
+	
+	axis2_status_t status = AXIS2_FAILURE;
+
+	axis2_allocator_t *allocator = axis2_allocator_init (NULL);
+	axis2_env_t *env = axis2_env_create (allocator);
+
+	qname = axis2_qname_create(&env, "name1", NULL, NULL);
+	svc = axis2_svc_create_with_qname(&env, qname);
+	moduleref = axis2_module_desc_create(&env);
+	axis2_config = axis2_conf_create(&env);
+	
+	status = axis2_svc_engage_module(svc, &env, moduleref, axis2_config); 
+
+	if(status != AXIS2_SUCCESS)
+	{
+	    printf("axis2_test_description_svc_engage_module ERROR %d\n", status);
+	}
+	else
+	    printf("axis2_test_svc_engage_module SUCCESS\n");
+
+	AXIS2_SVC_FREE(svc, &env);
+	AXIS2_QNAME_FREE(qname, &env);
+	AXIS2_MODULE_DESC_FREE(moduleref, &env);
+	AXIS2_CONF_FREE(axis2_config, &env);
+
+	return 0;
+}
 
 int main()
 {
 		axis2_test_op_engage_module();
+		axis2_test_svc_add_module_ops();
+		axis2_test_svc_engage_module();
 		return 0;
 }



Mime
View raw message