[Ds-java-dev] svn commit r14123 - in trunk/solutions/data-services/java/modules/ide/test: . org org/wso2 org/wso2/ws org/wso2/ws/dataservice org/wso2/ws/dataservice/ide org/wso2/ws/dataservice/ide/util

svn at wso2.org svn at wso2.org
Sun Feb 24 21:08:34 PST 2008


Author: sandakith
Date: Sun Feb 24 21:08:28 2008
New Revision: 14123

Log:

added a test case to XML Pretty print of the default data service config

Added:
   trunk/solutions/data-services/java/modules/ide/test/
   trunk/solutions/data-services/java/modules/ide/test/org/
   trunk/solutions/data-services/java/modules/ide/test/org/wso2/
   trunk/solutions/data-services/java/modules/ide/test/org/wso2/ws/
   trunk/solutions/data-services/java/modules/ide/test/org/wso2/ws/dataservice/
   trunk/solutions/data-services/java/modules/ide/test/org/wso2/ws/dataservice/ide/
   trunk/solutions/data-services/java/modules/ide/test/org/wso2/ws/dataservice/ide/util/
   trunk/solutions/data-services/java/modules/ide/test/org/wso2/ws/dataservice/ide/util/DataServiceXMLUtilTest.java

Added: trunk/solutions/data-services/java/modules/ide/test/org/wso2/ws/dataservice/ide/util/DataServiceXMLUtilTest.java
==============================================================================
--- (empty file)
+++ trunk/solutions/data-services/java/modules/ide/test/org/wso2/ws/dataservice/ide/util/DataServiceXMLUtilTest.java	Sun Feb 24 21:08:28 2008
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.ws.dataservice.ide.util;
+
+import java.io.OutputStream;
+
+import org.wso2.ws.dataservice.ide.constant.WSO2DataserviceWizardConstant;
+
+import junit.framework.TestCase;
+
+public class DataServiceXMLUtilTest extends TestCase {
+	
+	/**
+	 * Test method to check the pretty print of the default data service configuration
+	 */
+	public void testprettyPrintDSConfig(){
+		System.out.println("Initial XML :");
+		System.out.println(WSO2DataserviceWizardConstant.defaultDataServiceConfig);
+		try {
+			OutputStream stream = DataServiceXMLUtil
+					.prettyPrintDSConfig(WSO2DataserviceWizardConstant.defaultDataServiceConfig);
+			System.out.println("\nPretty Print XML :\n"	+ stream.toString());
+			boolean result = ( WSO2DataserviceWizardConstant.defaultDataServiceConfig.length()
+									< stream.toString().length() );
+			assert(result);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+}



More information about the Ds-java-dev mailing list