cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r540002 - in /incubator/cxf/trunk: systests/src/test/java/org/apache/cxf/systest/outofband/header/ tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/
Date Mon, 21 May 2007 02:38:44 GMT
Author: mmao
Date: Sun May 20 19:38:43 2007
New Revision: 540002

URL: http://svn.apache.org/viewvc?view=rev&rev=540002
Log:
* Remove a .bak file checked in last commit by accident
* Remove System.out in OOBHdrTest


Removed:
    incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/SchemaValidatorTest.java.bak
Modified:
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHdrServiceImpl.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHdrServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHdrServiceImpl.java?view=diff&rev=540002&r1=540001&r2=540002
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHdrServiceImpl.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHdrServiceImpl.java
Sun May 20 19:38:43 2007
@@ -55,7 +55,7 @@
         inout.value.setTickerPrice(4.5f);
         inout.value.setTickerSymbol("APACHE");
         if (checkContext()) {
-            System.out.println("Received out-of-band header as expected..");
+            //System.out.println("Received out-of-band header as expected..");
             sendReturnOOBHeader();
         }
     }   
@@ -83,7 +83,7 @@
                     hdrList.add(hdr);
                     //Add headerHolder to requestContext.
                     ctx.put(Header.HEADER_LIST, hdrList);
-                    System.out.println("Completed adding list to context");
+                    //System.out.println("Completed adding list to context");
                 } catch (Exception ex) {
                     ex.printStackTrace();
                 }
@@ -92,9 +92,8 @@
     }
     
     public void putLastTradedPrice(TradePriceData body) {
-        
-        System.out.println("-----TradePriceData TickerPrice : ----- " + body.getTickerPrice());
-        System.out.println("-----TradePriceData TickerSymbol : ----- " + body.getTickerSymbol());
+        //System.out.println("-----TradePriceData TickerPrice : ----- " + body.getTickerPrice());
+        //System.out.println("-----TradePriceData TickerSymbol : ----- " + body.getTickerSymbol());
     }
     
     private boolean checkContext() {
@@ -109,17 +108,19 @@
                     Object hdr = iter.next();
                     if (hdr instanceof Header && ((Header) hdr).getObject() instanceof
Node) {
                         Header hdr1 = (Header) hdr;
-                        System.out.println("Node conains : " + hdr1.getObject().toString());
+                        //System.out.println("Node conains : " + hdr1.getObject().toString());
                         try {
                             JAXBElement job = (JAXBElement) JAXBContext.newInstance(ObjectFactory.class)
                                 .createUnmarshaller()
                                 .unmarshal((Node) hdr1.getObject());
                             OutofBandHeader ob = (OutofBandHeader) job.getValue();
-                            System.out.println("oob-hdr contains : \nname = " 
-                                  + ob.getName() 
-                                  + "  \nvalue = " + ob.getValue() 
-                                  + " \natribute = " + ob.getHdrAttribute());
-                            success = true;
+                            if ("testOobHeader".equals(ob.getName())
+                                && "testOobHeaderValue".equals(ob.getValue())
+                                && "testHdrAttribute".equals(ob.getHdrAttribute()))
{
+                                success = true;
+                            } else {
+                                throw new RuntimeException("test failed");
+                            }
                         } catch (JAXBException ex) {
                             //
                             ex.printStackTrace();
@@ -127,10 +128,11 @@
                     }
                 }
             } else {
-                System.out.println("----- Header should not be null and should be of type
JAXBHeaderHolder");
+                throw new RuntimeException("Header should not be null"
+                                           + "and should be of type JAXBHeaderHolder");
             }
         } else {
-            System.out.println("----- MessageContext is null or doesnot contain OOBHeaders");
+            throw new RuntimeException("MessageContext is null or doesnot contain OOBHeaders");
         }
         
         return success;

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java?view=diff&rev=540002&r1=540001&r2=540002
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
Sun May 20 19:38:43 2007
@@ -106,7 +106,7 @@
                 requestContext.put(Header.HEADER_LIST, holder); 
             }
         } catch (JAXBException ex) {
-            System.out.println("failed to insert header into request context :" + ex);
+            //System.out.println("failed to insert header into request context :" + ex);
         }
         
     }
@@ -133,16 +133,16 @@
                     if (hdr instanceof Header) {
                         Header hdr1 = (Header) hdr;
                         if (hdr1.getObject() instanceof Node) {
-                            System.out.println("Node conains : " + hdr1.getObject().toString());
+                            //System.out.println("Node conains : " + hdr1.getObject().toString());
                             try {
                                 JAXBElement job = (JAXBElement) JAXBContext.newInstance(ObjectFactory.class)
                                     .createUnmarshaller()
                                     .unmarshal((Node) hdr1.getObject());
                                 hdrToTest = (OutofBandHeader) job.getValue();
-                                System.out.println("oob-hdr contains : \nname = " 
-                                      + hdrToTest.getName() 
-                                      + "  \nvalue = " + hdrToTest.getValue() 
-                                      + " \natribute = " + hdrToTest.getHdrAttribute());
+//                                 System.out.println("oob-hdr contains : \nname = " 
+//                                       + hdrToTest.getName() 
+//                                       + "  \nvalue = " + hdrToTest.getValue() 
+//                                       + " \natribute = " + hdrToTest.getHdrAttribute());
                             } catch (JAXBException ex) {
                                 //
                                 ex.printStackTrace();



Mime
View raw message