You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2005/12/13 08:39:53 UTC

svn commit: r356498 - in /webservices/axis2/trunk/c/test/unit/core: deployment/ deployment/.deps/ description/

Author: damitha
Date: Mon Dec 12 23:39:40 2005
New Revision: 356498

URL: http://svn.apache.org/viewcvs?rev=356498&view=rev
Log:
Added deployment unit test folder and descritpion tset files

Added:
    webservices/axis2/trunk/c/test/unit/core/deployment/
    webservices/axis2/trunk/c/test/unit/core/deployment/.deps/
    webservices/axis2/trunk/c/test/unit/core/deployment/.deps/deployment_test.Plo
    webservices/axis2/trunk/c/test/unit/core/deployment/.deps/main.Po
    webservices/axis2/trunk/c/test/unit/core/deployment/Makefile.am
    webservices/axis2/trunk/c/test/unit/core/deployment/deployment_test.c
    webservices/axis2/trunk/c/test/unit/core/deployment/deployment_test.h
    webservices/axis2/trunk/c/test/unit/core/deployment/main.c
    webservices/axis2/trunk/c/test/unit/core/deployment/test_phases_info.c
    webservices/axis2/trunk/c/test/unit/core/deployment/test_phases_info.h
    webservices/axis2/trunk/c/test/unit/core/description/test_optr.c
    webservices/axis2/trunk/c/test/unit/core/description/test_optr.h

Added: webservices/axis2/trunk/c/test/unit/core/deployment/.deps/deployment_test.Plo
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/core/deployment/.deps/deployment_test.Plo?rev=356498&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/unit/core/deployment/.deps/deployment_test.Plo (added)
+++ webservices/axis2/trunk/c/test/unit/core/deployment/.deps/deployment_test.Plo Mon Dec 12 23:39:40 2005
@@ -0,0 +1,87 @@
+deployment_test.lo deployment_test.o: deployment_test.c deployment_test.h \
+  /home/damitha/programs/cutest/include/CuTest.h /usr/include/setjmp.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/bits/wordsize.h \
+  /usr/include/gnu/stubs-32.h /usr/include/bits/setjmp.h \
+  /usr/include/bits/sigset.h \
+  /usr/lib/gcc/i386-redhat-linux/4.0.0/include/stdarg.h \
+  /usr/include/string.h \
+  /usr/lib/gcc/i386-redhat-linux/4.0.0/include/stddef.h \
+  /usr/include/bits/string.h /usr/include/bits/string2.h \
+  /usr/include/endian.h /usr/include/bits/endian.h \
+  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
+  /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+  /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h ../../../../include/axis2_allocator.h \
+  ../../../../include/axis2_defines.h ../../../../include/axis2_env.h \
+  ../../../../include/axis2_error.h ../../../../include/axis2_stream.h \
+  ../../../../include/axis2_log.h
+
+deployment_test.h:
+
+/home/damitha/programs/cutest/include/CuTest.h:
+
+/usr/include/setjmp.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/gnu/stubs-32.h:
+
+/usr/include/bits/setjmp.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/lib/gcc/i386-redhat-linux/4.0.0/include/stdarg.h:
+
+/usr/include/string.h:
+
+/usr/lib/gcc/i386-redhat-linux/4.0.0/include/stddef.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+../../../../include/axis2_allocator.h:
+
+../../../../include/axis2_defines.h:
+
+../../../../include/axis2_env.h:
+
+../../../../include/axis2_error.h:
+
+../../../../include/axis2_stream.h:
+
+../../../../include/axis2_log.h:

Added: webservices/axis2/trunk/c/test/unit/core/deployment/.deps/main.Po
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/core/deployment/.deps/main.Po?rev=356498&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/unit/core/deployment/.deps/main.Po (added)
+++ webservices/axis2/trunk/c/test/unit/core/deployment/.deps/main.Po Mon Dec 12 23:39:40 2005
@@ -0,0 +1,29 @@
+main.o main.o: main.c deployment_test.h \
+  /home/damitha/programs/cutest/include/CuTest.h /usr/include/setjmp.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/bits/wordsize.h \
+  /usr/include/gnu/stubs-32.h /usr/include/bits/setjmp.h \
+  /usr/include/bits/sigset.h \
+  /usr/lib/gcc/i386-redhat-linux/4.0.0/include/stdarg.h
+
+deployment_test.h:
+
+/home/damitha/programs/cutest/include/CuTest.h:
+
+/usr/include/setjmp.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/gnu/stubs-32.h:
+
+/usr/include/bits/setjmp.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/lib/gcc/i386-redhat-linux/4.0.0/include/stdarg.h:

Added: webservices/axis2/trunk/c/test/unit/core/deployment/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/core/deployment/Makefile.am?rev=356498&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/unit/core/deployment/Makefile.am (added)
+++ webservices/axis2/trunk/c/test/unit/core/deployment/Makefile.am Mon Dec 12 23:39:40 2005
@@ -0,0 +1,30 @@
+prgbindir=$(prefix)/bin/unit_test
+prglibdir=$(prefix)/lib/unit_test
+prglib_LTLIBRARIES = libtest_deployment.la
+AM_CPPFLAGS = $(CPPFLAGS)
+libtest_deployment_la_SOURCES = deployment_test.c
+include_HEADERS=$(top_builddir)/test/unit/core/deployment/*.h
+
+
+INCLUDES = -I$(top_builddir)/include \
+            -I$(top_builddir)/modules/util/src \
+            -I${CUTEST_HOME}/include
+
+prgbin_PROGRAMS = deployment_test
+deployment_test_SOURCES = main.c
+deployment_test_LDADD   =  $(LDFLAGS) libtest_deployment.la  \
+                     -L$(CUTEST_HOME)/lib \
+                     -lcutest \
+                    -L$(top_builddir)/install/lib \
+                    -laxis2_util \
+                    -laxis2_context \
+                    -laxis2_deployment \
+                    -laxis2_description \
+                    -laxis2_engine \
+                    -laxis2_wsdl \
+                    -laxis2_phaseresolver \
+                    -laxis2_om \
+                    -laxis2_parser \
+                    -L$(GUTHTHILA_LIB) $(GUTHTHILA_LIBNAME) \
+                    -L$(LIBXML2_LIB) $(LIBXML2_LIBNAME)
+

Added: webservices/axis2/trunk/c/test/unit/core/deployment/deployment_test.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/core/deployment/deployment_test.c?rev=356498&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/unit/core/deployment/deployment_test.c (added)
+++ webservices/axis2/trunk/c/test/unit/core/deployment/deployment_test.c Mon Dec 12 23:39:40 2005
@@ -0,0 +1,12 @@
+#include "deployment_test.h"
+#include <string.h>
+#include <stdio.h>
+#include <axis2_allocator.h>
+#include <axis2_env.h>
+
+CuSuite* axis2_deploymentGetSuite() {
+    CuSuite* suite = CuSuiteNew();
+    /*SUITE_ADD_TEST(suite, Testaxis2_phases_info_get_op_in_phases );*/
+    return suite;
+}
+

Added: webservices/axis2/trunk/c/test/unit/core/deployment/deployment_test.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/core/deployment/deployment_test.h?rev=356498&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/unit/core/deployment/deployment_test.h (added)
+++ webservices/axis2/trunk/c/test/unit/core/deployment/deployment_test.h Mon Dec 12 23:39:40 2005
@@ -0,0 +1,8 @@
+#ifndef DEPLOYMENT_TEST_H
+#define DEPLOYMENT_TEST_H
+
+#include <CuTest.h>
+
+CuSuite* axis2_deploymentGetSuite();
+
+#endif /* DEPLOYMENT_TEST_H */

Added: webservices/axis2/trunk/c/test/unit/core/deployment/main.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/core/deployment/main.c?rev=356498&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/unit/core/deployment/main.c (added)
+++ webservices/axis2/trunk/c/test/unit/core/deployment/main.c Mon Dec 12 23:39:40 2005
@@ -0,0 +1,18 @@
+#include "deployment_test.h"
+
+void RunAllTests(void) {
+    CuString *output = CuStringNew();
+    CuSuite* suite = CuSuiteNew();
+
+    CuSuiteAddSuite(suite, axis2_deploymentGetSuite());
+
+    CuSuiteRun(suite);
+    CuSuiteSummary(suite, output);
+    CuSuiteDetails(suite, output);
+    printf("%s\n", output->buffer);
+}
+
+int main(void) {
+    RunAllTests();
+    return 0;
+}

Added: webservices/axis2/trunk/c/test/unit/core/deployment/test_phases_info.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/core/deployment/test_phases_info.c?rev=356498&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/unit/core/deployment/test_phases_info.c (added)
+++ webservices/axis2/trunk/c/test/unit/core/deployment/test_phases_info.c Mon Dec 12 23:39:40 2005
@@ -0,0 +1,9 @@
+#include "test_phases_info.h"
+
+void Testaxis2_phases_info_get_op_in_phases(CuTest *tc)
+{
+    axis2_allocator_t *allocator = axis2_allocator_init (NULL);
+    axis2_env_t *environment = axis2_env_create (allocator);
+
+}
+

Added: webservices/axis2/trunk/c/test/unit/core/deployment/test_phases_info.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/core/deployment/test_phases_info.h?rev=356498&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/unit/core/deployment/test_phases_info.h (added)
+++ webservices/axis2/trunk/c/test/unit/core/deployment/test_phases_info.h Mon Dec 12 23:39:40 2005
@@ -0,0 +1,15 @@
+#ifndef TEST_DEPLOYMENT_H
+#define TEST_DEPLOYMENT_H
+
+#include <string.h>
+#include <stdio.h>
+#include <CuTest.h>
+#include <axis2_allocator.h>
+#include <axis2_env.h>
+#include <axis2_hash.h>
+#include <axis2_string.h>
+#include <axis2_phases_info.h>
+
+void Testaxis2_phases_info_get_op_in_phases(CuTest *tc)
+
+#endif /* TEST_DEPLOYMENT_H*/

Added: webservices/axis2/trunk/c/test/unit/core/description/test_optr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/core/description/test_optr.c?rev=356498&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/unit/core/description/test_optr.c (added)
+++ webservices/axis2/trunk/c/test/unit/core/description/test_optr.c Mon Dec 12 23:39:40 2005
@@ -0,0 +1,49 @@
+#include "test_optr.h"
+
+void add_handlers_to_flow(struct axis2_flow *flow, axis2_env_t **env);
+axis2_array_list_t *get_op_in_phases(axis2_env_t **env);
+
+void Testaxis2_op_set_remaining_phases_inflow(CuTest *tc)
+{
+    axis2_array_list_t *op_in_phases = NULL;
+    axis2_status_t expected = AXIS2_SUCCESS;
+    axis2_status_t actual = AXIS2_FAILURE;
+    
+    axis2_allocator_t *allocator = axis2_allocator_init (NULL);
+    axis2_env_t *env = axis2_env_create (allocator);
+
+    struct axis2_op *optr = axis2_op_create(&env);
+    op_in_phases = get_op_in_phases(&env);  
+    actual = AXIS2_OPERATION_SET_REMAINING_PHASES_INFLOW(optr, &env, op_in_phases);
+    
+    CuAssertIntEquals(tc, expected, actual);
+}
+
+/** helper method. This is the requirement method from phases_info's 
+  * axis2_get_op_in_phases method
+  */
+axis2_array_list_t *get_op_in_phases(axis2_env_t **env)
+{
+    struct axis2_phase *phase = NULL; 
+    axis2_array_list_t *op_in_phases = NULL; 
+    
+    op_in_phases = axis2_array_list_create(env, 0);
+    
+    phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
+    AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
+    
+    phase = axis2_phase_create(env, AXIS2_PHASE_TRANSPORTIN);   
+    AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
+    
+    phase = axis2_phase_create(env, AXIS2_PHASE_PRE_DISPATCH);   
+    AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
+    
+    phase = axis2_phase_create(env, AXIS2_PHASE_DISPATCH);  
+    AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
+    
+    phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);   
+    AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
+    
+    return op_in_phases;
+
+}

Added: webservices/axis2/trunk/c/test/unit/core/description/test_optr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/core/description/test_optr.h?rev=356498&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/unit/core/description/test_optr.h (added)
+++ webservices/axis2/trunk/c/test/unit/core/description/test_optr.h Mon Dec 12 23:39:40 2005
@@ -0,0 +1,21 @@
+#ifndef TEST_OPERATION_H
+#define TEST_OPERATION_H
+
+#include <string.h>
+#include <stdio.h>
+#include <CuTest.h>
+#include <axis2_allocator.h>
+#include <axis2_env.h>
+#include <axis2_hash.h>
+#include <axis2_string.h>
+#include <axis2_op.h>
+#include <axis2_module_desc.h>
+#include <axis2_op.h>
+#include <axis2_flow.h>
+
+struct axis2_op;
+
+
+void Testaxis2_op_set_remaining_phases_inflow(CuTest *tc);
+
+#endif /* TEST_OPERATION_H*/