incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject svn commit: r1236486 [42/43] - in /incubator/ooo/devtools/netbeansintegration: ./ build/ build/public-package-jars/ javahelp/ javahelp/org/ javahelp/org/openoffice/ javahelp/org/openoffice/extensions/ javahelp/org/openoffice/extensions/docs/ javahelp/o...
Date Fri, 27 Jan 2012 01:29:58 GMT
Added: incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/OrderedContainerTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/OrderedContainerTest.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/OrderedContainerTest.java (added)
+++ incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/OrderedContainerTest.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,313 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: OrderedContainerTest.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/09/04 15:06:45 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.util.datamodel;
+
+import junit.framework.*;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.Vector;
+import org.openoffice.extensions.util.LogWriter;
+
+/**
+ *
+ * @author sg128468
+ */
+public class OrderedContainerTest extends TestCase {
+    
+    public OrderedContainerTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+    }
+
+    protected void tearDown() throws Exception {
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(OrderedContainerTest.class);
+        
+        return suite;
+    }
+
+    /**
+     * Test of put method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testPut() {
+        System.out.println("put");
+        
+        String key = "key";
+        String expResult = "a value";
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        
+        instance.put(key, expResult);
+
+        String result = instance.get(key);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of insertElementAt method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testInsertElementAt() {
+        System.out.println("insertElementAt");
+        
+        String key1 = "key1";
+        String key2 = "key2";
+        String value1 = "value1";
+        String value2 = "value2";
+        int position = 0;
+        
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        
+        instance.insertElementAt(key1, value1, position);
+        instance.insertElementAt(key2, value2, position);
+        
+        int result = instance.getPositionFromKey(key2);
+        assertEquals(position, result);
+
+        result = instance.getPositionFromKey(key1);
+        assertEquals(position + 1, result);
+    }
+
+    /**
+     * Test of get method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testGet() {
+        System.out.println("get");
+        
+        String key = "key";
+        String expResult = "a value";
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        
+        instance.put(key, expResult);
+
+        String result = instance.get(key);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of getNameFromObject method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testGetNameFromObject() {
+        System.out.println("getNameFromObject");
+        
+        String expResult = "key";
+        String value = "a value";
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        
+        instance.put(expResult, value);
+        String result = instance.getKeyFromObject(value);
+
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of keys method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testKeys() {
+        System.out.println("keys");
+        
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        
+        final String[] keys = new String[]{"key1", "key2"};
+        instance.put(keys[0], "value1");
+        instance.put(keys[1], "value2");
+
+        Enumeration<String> result = instance.keys();
+
+        int index = 0;
+        while (result.hasMoreElements()) {
+            assertEquals(keys[index++], result.nextElement());
+        }
+    }
+
+    /**
+     * Test of values method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testValues() {
+        System.out.println("values");
+        
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+
+        final String[] value = new String[]{"value1", "value2"};
+        instance.put("key0", value[0]);
+        instance.put("key1", value[1]);
+        
+        Collection<String> result = instance.values();
+        int index = 0;
+        for (Iterator<String> it = result.iterator(); it.hasNext();) {
+            String resultElem = it.next();
+            assertEquals(value[index++], resultElem);
+        }
+    }
+
+    /**
+     * Test of remove method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testRemove() {
+        System.out.println("remove");
+        
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        instance.put("key0", "value0");
+        instance.put("key1", "value1");
+        
+        String expResult = null;
+        String result = instance.remove("key0");
+        assertEquals("value0", result);
+        result = instance.get("key0");
+        assertNull(result);
+        result = instance.get("key1");
+        assertEquals("value1", result);
+    }
+
+    /**
+     * Test of getPositionFromKey method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testGetPositionFromKey() {
+        System.out.println("getPositionFromKey");
+        
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        instance.put("key1", "value0");
+        instance.put("key3", "value1");
+
+        instance.insertElementAt("key2", "value2", 1);
+        for (int expResult = 1; expResult < 4; expResult++) {
+            int result = instance.getPositionFromKey("key" + expResult);
+            assertEquals(expResult - 1, result);
+        }
+        instance.insertElementAt("key0", "value3", 0);
+        for (int expResult = 0; expResult < 4; expResult++) {
+            int result = instance.getPositionFromKey("key" + expResult);
+            assertEquals(expResult, result);
+        }
+    }
+
+    /**
+     * Test of size method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testSize() {
+        System.out.println("size");
+        
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        for (int i = 0; i < 255; i++) {
+            instance.put("key" + i, "value" + i);
+        }
+        
+        int expResult = 255;
+        int result = instance.size();
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of getPositionFromObject method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testGetPositionFromObject() {
+        System.out.println("getPositionFromObject");
+        
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        instance.put("key0", "value0");
+        instance.put("key1", "value1");
+        
+        int expResult = 0;
+        int result = instance.getPositionFromObject("value0");
+        assertEquals(expResult, result);
+
+        expResult = 1;
+        result = instance.getPositionFromObject("value1");
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of getKeysInOrder method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testGetKeysInOrder() {
+        System.out.println("getKeysInOrder");
+        
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        String[] keys = new String[]{"key0", "key1", "key2"};
+        instance.put(keys[0], "value0");
+        instance.put(keys[1], "value1");
+        instance.put(keys[2], "value2");
+        
+        String[] result = instance.getKeysInOrder();
+        for (int i = 0; i < result.length; i++) {
+            assertEquals(keys[i], result[i]);
+        }
+    }
+
+    /**
+     * Test of valuesInOrder method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testValuesInOrder() {
+        System.out.println("valuesInOrder");
+        
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        String[] values = new String[]{"value0", "value0", "value0"};
+        instance.put("key0", values[0]);
+        instance.put("key1", values[0]);
+        instance.put("key2", values[0]);
+        
+        Collection<String> result = instance.valuesInOrder();
+        int index = 0;
+        for (Iterator<String> it = result.iterator(); it.hasNext();) {
+            String elem = it.next();
+            assertEquals(elem, values[index++]);
+        }
+    }
+
+    /**
+     * Test of getNextNumber method, of class org.openoffice.extensions.util.datamodel.OrderedContainer.
+     */
+    public void testGetNextNumber() {
+        System.out.println("getNextNumber");
+        
+        String prefix = "key";
+        OrderedContainer<String> instance = new OrderedContainer<String>();
+        String[] keys = new String[]{"key0", "key1", "key2"};
+        instance.put(keys[0], "value0");
+        instance.put(keys[1], "value1");
+        instance.put(keys[2], "value2");
+        
+        String expResult = "3";
+        String result = instance.getNextNumber(prefix);
+        assertEquals(expResult, result);
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/ParameterTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/ParameterTest.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/ParameterTest.java (added)
+++ incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/ParameterTest.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,230 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: ParameterTest.java,v $
+ *
+ *  $Revision: 1.2 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/07/31 15:45:14 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.util.datamodel;
+
+import junit.framework.*;
+import java.beans.PropertyChangeListener;
+import javax.swing.Action;
+import org.openide.nodes.Node;
+import org.openide.nodes.Sheet;
+import org.openoffice.extensions.util.datamodel.actions.BaseAction;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgProperty;
+
+/**
+ *
+ * @author sg128468
+ */
+public class ParameterTest extends TestCase {
+    
+    public ParameterTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+    }
+
+    protected void tearDown() throws Exception {
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(ParameterTest.class);
+        
+        return suite;
+    }
+
+    /**
+     * Test of printLanguages method, of class org.openoffice.extensions.util.datamodel.Parameter.
+     */
+    public void testPrintLanguages() {
+        System.out.println("printLanguages");
+        
+        Parameter instance = null;
+        
+        instance.printLanguages();
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getDisplayName method, of class org.openoffice.extensions.util.datamodel.Parameter.
+     */
+    public void testGetDisplayName() {
+        System.out.println("getDisplayName");
+        
+        Parameter instance = null;
+        
+        String expResult = "";
+        String result = instance.getDisplayName();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getProperty method, of class org.openoffice.extensions.util.datamodel.Parameter.
+     */
+    public void testGetProperty() {
+        System.out.println("getProperty");
+        
+        int propertyIndex = 0;
+        Parameter instance = null;
+        
+        OpenOfficeOrgProperty expResult = null;
+        OpenOfficeOrgProperty result = instance.getProperty(propertyIndex);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getAllSubObjects method, of class org.openoffice.extensions.util.datamodel.Parameter.
+     */
+    public void testGetAllSubObjects() {
+        System.out.println("getAllSubObjects");
+        
+        Parameter instance = null;
+        
+        NbNodeObject[] expResult = null;
+        NbNodeObject[] result = instance.getAllSubObjects();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of createProperties method, of class org.openoffice.extensions.util.datamodel.Parameter.
+     */
+    public void testCreateProperties() {
+        System.out.println("createProperties");
+        
+        Sheet sheet = null;
+        PropertyChangeListener listener = null;
+        Parameter instance = null;
+        
+        Node.Property[] expResult = null;
+        Node.Property[] result = instance.createProperties(sheet, listener);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of setActions method, of class org.openoffice.extensions.util.datamodel.Parameter.
+     */
+    public void testSetActions() {
+        System.out.println("setActions");
+        
+        BaseAction baseAction = null;
+        Parameter instance = null;
+        
+        instance.setActions(baseAction);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getActions method, of class org.openoffice.extensions.util.datamodel.Parameter.
+     */
+    public void testGetActions() {
+        System.out.println("getActions");
+        
+        boolean b = true;
+        Parameter instance = null;
+        
+        Action[] expResult = null;
+        Action[] result = instance.getActions(b);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of hasActions method, of class org.openoffice.extensions.util.datamodel.Parameter.
+     */
+    public void testHasActions() {
+        System.out.println("hasActions");
+        
+        int type = 0;
+        Parameter instance = null;
+        
+        boolean expResult = true;
+        boolean result = instance.hasActions(type);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getParent method, of class org.openoffice.extensions.util.datamodel.Parameter.
+     */
+    public void testGetParent() {
+        System.out.println("getParent");
+        
+        Parameter instance = null;
+        
+        NbNodeObject expResult = null;
+        NbNodeObject result = instance.getParent();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getType method, of class org.openoffice.extensions.util.datamodel.Parameter.
+     */
+    public void testGetType() {
+        System.out.println("getType");
+        
+        Parameter instance = null;
+        
+        int expResult = 0;
+        int result = instance.getType();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/PolyStructTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/PolyStructTest.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/PolyStructTest.java (added)
+++ incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/PolyStructTest.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,377 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: PolyStructTest.java,v $
+ *
+ *  $Revision: 1.2 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/08/01 15:45:11 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.util.datamodel;
+
+import junit.framework.*;
+import java.beans.PropertyChangeListener;
+import javax.swing.Action;
+import org.openide.nodes.Node;
+import org.openide.nodes.Sheet;
+import org.openoffice.extensions.util.datamodel.actions.BaseAction;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgProperty;
+
+/**
+ *
+ * @author sg128468
+ */
+public class PolyStructTest extends TestCase {
+    
+    public PolyStructTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+    }
+
+    protected void tearDown() throws Exception {
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(PolyStructTest.class);
+        
+        return suite;
+    }
+
+    /**
+     * Test of getPropertyType method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetPropertyType() {
+        System.out.println("getPropertyType");
+        
+        String name = "";
+        PolyStruct instance = null;
+        
+        Parameter expResult = null;
+        Parameter result = instance.getPropertyType(name);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of addPropertyType method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testAddPropertyType() {
+        System.out.println("addPropertyType");
+        
+        PolyStruct instance = null;
+        
+        Parameter expResult = null;
+        Parameter result = instance.addPropertyType();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of removePropertyType method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testRemovePropertyType() {
+        System.out.println("removePropertyType");
+        
+        String name = "";
+        PolyStruct instance = null;
+        
+        instance.removePropertyType(name);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getTemplateType method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetTemplateType() {
+        System.out.println("getTemplateType");
+        
+        String name = "";
+        PolyStruct instance = null;
+        
+        TemplateType expResult = null;
+        TemplateType result = instance.getTemplateType(name);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of addTemplateType method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testAddTemplateType() {
+        System.out.println("addTemplateType");
+        
+        PolyStruct instance = null;
+        
+        TemplateType expResult = null;
+        TemplateType result = instance.addTemplateType();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of removeTemplateType method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testRemoveTemplateType() {
+        System.out.println("removeTemplateType");
+        
+        String name = "";
+        PolyStruct instance = null;
+        
+        instance.removeTemplateType(name);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getTemplateTypeNames method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetTemplateTypeNames() {
+        System.out.println("getTemplateTypeNames");
+        
+        PolyStruct instance = null;
+        
+        String[] expResult = null;
+        String[] result = instance.getTemplateTypeNames();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getAllSetObjectNames method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetAllSetObjectNames() {
+        System.out.println("getAllSetObjectNames");
+        
+        PolyStruct instance = null;
+        
+        String[] expResult = null;
+        String[] result = instance.getAllSetObjectNames();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getSetObject method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetSetObject() {
+        System.out.println("getSetObject");
+        
+        String internalName = "";
+        PolyStruct instance = null;
+        
+        Object expResult = null;
+        Object result = instance.getSetObject(internalName);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of addSetObject method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testAddSetObject() {
+        System.out.println("addSetObject");
+        
+        String internalName = "";
+        Object setObject = null;
+        PolyStruct instance = null;
+        
+        instance.addSetObject(internalName, setObject);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getDisplayName method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetDisplayName() {
+        System.out.println("getDisplayName");
+        
+        PolyStruct instance = null;
+        
+        String expResult = "";
+        String result = instance.getDisplayName();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getAllSubObjects method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetAllSubObjects() {
+        System.out.println("getAllSubObjects");
+        
+        PolyStruct instance = null;
+        
+        NbNodeObject[] expResult = null;
+        NbNodeObject[] result = instance.getAllSubObjects();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getProperty method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetProperty() {
+        System.out.println("getProperty");
+        
+        int propertyIndex = 0;
+        PolyStruct instance = null;
+        
+        OpenOfficeOrgProperty expResult = null;
+        OpenOfficeOrgProperty result = instance.getProperty(propertyIndex);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of createProperties method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testCreateProperties() {
+        System.out.println("createProperties");
+        
+        Sheet sheet = null;
+        PropertyChangeListener listener = null;
+        PolyStruct instance = null;
+        
+        Node.Property[] expResult = null;
+        Node.Property[] result = instance.createProperties(sheet, listener);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of hasActions method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testHasActions() {
+        System.out.println("hasActions");
+        
+        int type = 0;
+        PolyStruct instance = null;
+        
+        boolean expResult = true;
+        boolean result = instance.hasActions(type);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getActions method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetActions() {
+        System.out.println("getActions");
+        
+        boolean b = true;
+        PolyStruct instance = null;
+        
+        Action[] expResult = null;
+        Action[] result = instance.getActions(b);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of setActions method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testSetActions() {
+        System.out.println("setActions");
+        
+        BaseAction baseAction = null;
+        PolyStruct instance = null;
+        
+        instance.setActions(baseAction);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getParent method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetParent() {
+        System.out.println("getParent");
+        
+        PolyStruct instance = null;
+        
+        NbNodeObject expResult = null;
+        NbNodeObject result = instance.getParent();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getType method, of class org.openoffice.extensions.util.datamodel.PolyStruct.
+     */
+    public void testGetType() {
+        System.out.println("getType");
+        
+        PolyStruct instance = null;
+        
+        int expResult = 0;
+        int result = instance.getType();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/PropertyContainerTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/PropertyContainerTest.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/PropertyContainerTest.java (added)
+++ incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/PropertyContainerTest.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: PropertyContainerTest.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/09/04 15:06:44 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.util.datamodel;
+
+import junit.framework.*;
+import org.openoffice.extensions.util.datamodel.localization.LanguageDefinition;
+import org.openoffice.extensions.util.datamodel.properties.LocalizedOpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.SimpleOpenOfficeOrgProperty;
+
+/**
+ *
+ * @author sg128468
+ */
+public class PropertyContainerTest extends TestCase {
+    
+    public PropertyContainerTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+    }
+
+    protected void tearDown() throws Exception {
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(PropertyContainerTest.class);
+        
+        return suite;
+    }
+
+    /**
+     * Test of getLocalizedProperty method, of class org.openoffice.extensions.util.datamodel.PropertyContainer.
+     */
+    public void testGetLocalizedProperty() throws Exception {
+        System.out.println("getLocalizedProperty");
+        
+        String propertyName = PropertyContainer.PROPERTY_CONTAINER_DISPLAY_NAME;
+        int languageID = LanguageDefinition.LANGUAGE_ID_en;
+        PropertyContainer instance = new PropertyContainerImpl();
+        
+        String expResult = "localizedvalue";
+        String result = instance.getLocalizedProperty(propertyName, languageID);
+        assertEquals(expResult, result);
+        
+    }
+
+    /**
+     * Test of setLocalizedProperty method, of class org.openoffice.extensions.util.datamodel.PropertyContainer.
+     */
+    public void testSetLocalizedProperty() throws Exception {
+        System.out.println("setLocalizedProperty");
+        
+        String propertyName = PropertyContainer.PROPERTY_CONTAINER_DISPLAY_NAME;
+        int languageID = LanguageDefinition.LANGUAGE_ID_en;
+        String value = "newValue";
+        PropertyContainer instance = new PropertyContainerImpl();
+        
+        instance.setLocalizedProperty(propertyName, languageID, value);
+        
+        String expResult = value;
+        String result = instance.getLocalizedProperty(propertyName, languageID);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of getSimpleProperty method, of class org.openoffice.extensions.util.datamodel.PropertyContainer.
+     */
+    public void testGetSimpleProperty() throws Exception {
+        System.out.println("getSimpleProperty");
+        
+        String propertyName = PropertyContainer.PROPERTY_CONTAINER_NAME;
+        PropertyContainer instance = new PropertyContainerImpl();
+        
+        String expResult = "value";
+        String result = instance.getSimpleProperty(propertyName);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of setSimpleProperty method, of class org.openoffice.extensions.util.datamodel.PropertyContainer.
+     */
+    public void testSetSimpleProperty() throws Exception {
+        System.out.println("setSimpleProperty");
+        
+        String propertyName = PropertyContainer.PROPERTY_CONTAINER_NAME;
+        String value = "newValue";
+        PropertyContainer instance = new PropertyContainerImpl();
+        
+        instance.setSimpleProperty(propertyName, value);
+        
+        String expResult = value;
+        String result = instance.getSimpleProperty(propertyName);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of isPropertyLocalized method, of class org.openoffice.extensions.util.datamodel.PropertyContainer.
+     */
+    public void testIsPropertyLocalized() throws Exception {
+        System.out.println("isPropertyLocalized");
+        
+        PropertyContainer instance = new PropertyContainerImpl();
+        
+        String propertyName = PropertyContainer.PROPERTY_CONTAINER_DISPLAY_NAME;
+        boolean expResult = true;
+        boolean result = instance.isPropertyLocalized(propertyName);
+        assertEquals(expResult, result);
+        
+        propertyName = PropertyContainer.PROPERTY_CONTAINER_NAME;
+        expResult = false;
+        result = instance.isPropertyLocalized(propertyName);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of setLanguageWithDefaultText method, of class org.openoffice.extensions.util.datamodel.PropertyContainer.
+     */
+    public void testSetLanguageWithDefaultText() throws Exception {
+        System.out.println("setLanguageWithDefaultText");
+        
+        int languageID = LanguageDefinition.LANGUAGE_ID_ar;
+        String text = "default";
+        PropertyContainer instance = new PropertyContainerImpl();
+        
+        instance.setLanguageWithDefaultText(languageID, text);
+        
+        String expResult = text;
+        String result = instance.getLocalizedProperty(
+            PropertyContainer.PROPERTY_CONTAINER_DISPLAY_NAME, languageID);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of removeLanguageAndText method, of class org.openoffice.extensions.util.datamodel.PropertyContainer.
+     */
+    public void testRemoveLanguageAndText() throws Exception {
+        System.out.println("removeLanguageAndText");
+        
+        int languageID = LanguageDefinition.LANGUAGE_ID_ar;
+        PropertyContainer instance = new PropertyContainerImpl();
+
+        instance.setLanguageWithDefaultText(languageID, "dummy");
+        
+        instance.removeLanguageAndText(languageID);
+
+        String result = instance.getLocalizedProperty(PropertyContainer.PROPERTY_CONTAINER_DISPLAY_NAME, languageID);
+        assertNull(result);
+    }
+
+    /**
+     * Test of getAllPropertyNames method, of class org.openoffice.extensions.util.datamodel.PropertyContainer.
+     */
+    public void testGetAllPropertyNames() {
+        System.out.println("getAllPropertyNames");
+        
+        PropertyContainer instance = null;
+        
+        String[] expResult = new String[] {
+            PropertyContainer.PROPERTY_CONTAINER_NAME,
+            PropertyContainer.PROPERTY_CONTAINER_PACKAGE,
+            PropertyContainer.PROPERTY_CONTAINER_DISPLAY_NAME
+        };
+        String[] result = instance.getAllPropertyNames();
+        assertEquals(expResult.length, result.length);
+        for (int i = 0; i < expResult.length; i++) {
+            assertEquals(expResult[i], result[i]);
+        }
+    }
+
+    /**
+     * Test of getProperty method, of class org.openoffice.extensions.util.datamodel.PropertyContainer.
+     */
+    public void testGetProperty() throws Exception {
+        System.out.println("getProperty");
+        
+        String propertyName = PropertyContainer.PROPERTY_CONTAINER_PACKAGE;
+        PropertyContainer instance = new PropertyContainerImpl();
+        
+//        OpenOfficeOrgProperty expResult = null;
+        OpenOfficeOrgProperty result = instance.getProperty(propertyName);
+        assertNotNull(result);
+    }
+
+    /**
+     * Test of setProperty method, of class org.openoffice.extensions.util.datamodel.PropertyContainer.
+     */
+    public void testSetProperty() throws Exception {
+        System.out.println("setProperty");
+        
+        String propertyName = PropertyContainer.PROPERTY_CONTAINER_NAME;
+        OpenOfficeOrgProperty value = new SimpleOpenOfficeOrgProperty("newName", "value", "description", null, null);
+        PropertyContainer instance = new PropertyContainerImpl();
+        
+        instance.setProperty(propertyName, value);
+        OpenOfficeOrgProperty result = instance.getProperty(propertyName);
+
+        assertEquals(value, result);
+    }
+    
+    private class PropertyContainerImpl extends PropertyContainer {
+        public PropertyContainerImpl() {
+            super(new String[]{PROPERTY_CONTAINER_NAME, PROPERTY_CONTAINER_PACKAGE, PROPERTY_CONTAINER_DISPLAY_NAME});
+            properties[0] = new SimpleOpenOfficeOrgProperty("name", "value", "description", null, null);
+            properties[1] = new SimpleOpenOfficeOrgProperty("package", "a.package", "description", null, null);
+            properties[2] = new LocalizedOpenOfficeOrgProperty("displayName", "localizedvalue", "description", 
+                null, LanguageDefinition.LANGUAGE_ID_en, null);
+        }
+    }
+}

Added: incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/ServiceTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/ServiceTest.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/ServiceTest.java (added)
+++ incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/ServiceTest.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,318 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: ServiceTest.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/09/04 15:06:45 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.util.datamodel;
+
+import junit.framework.*;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyEditor;
+import java.util.Arrays;
+import java.util.Vector;
+import javax.swing.Action;
+import org.openide.nodes.Node;
+import org.openide.nodes.Sheet;
+import org.openide.util.NbBundle;
+import org.openoffice.extensions.config.ConfigurationSettings;
+import org.openoffice.extensions.projecttemplates.component.datamodel.types.node.ComponentInterfaceTypePropertyEditor;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.datamodel.actions.BaseAction;
+import org.openoffice.extensions.util.datamodel.properties.SimpleOpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.UnknownOpenOfficeOrgPropertyException;
+
+/**
+ *
+ * @author sg128468
+ */
+public class ServiceTest extends TestCase {
+    
+    public ServiceTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+    }
+
+    protected void tearDown() throws Exception {
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(ServiceTest.class);
+        
+        return suite;
+    }
+
+    /**
+     * Test of addInterface method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testAddInterface() {
+        System.out.println("addInterface");
+        
+        Service instance = null;
+        
+        Interface expResult = null;
+        Interface result = instance.addInterface();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of removeInterface method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testRemoveInterface() {
+        System.out.println("removeInterface");
+        
+        Interface ifc = null;
+        Service instance = null;
+        
+        instance.removeInterface(ifc);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getType method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testGetType() {
+        System.out.println("getType");
+        
+        Service instance = null;
+        
+        int expResult = 0;
+        int result = instance.getType();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getAllSetObjectNames method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testGetAllSetObjectNames() {
+        System.out.println("getAllSetObjectNames");
+        
+        Service instance = null;
+        
+        String[] expResult = null;
+        String[] result = instance.getAllSetObjectNames();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getSetObject method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testGetSetObject() {
+        System.out.println("getSetObject");
+        
+        String name = "";
+        Service instance = null;
+        
+        Object expResult = null;
+        Object result = instance.getSetObject(name);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of addSetObject method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testAddSetObject() {
+        System.out.println("addSetObject");
+        
+        String name = "";
+        Object setObject = null;
+        Service instance = null;
+        
+        instance.addSetObject(name, setObject);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of addLanguage method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testAddLanguage() {
+        System.out.println("addLanguage");
+        
+        int languageID = 0;
+        String defaultText = "";
+        Service instance = null;
+        
+        instance.addLanguage(languageID, defaultText);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of removeLanguage method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testRemoveLanguage() {
+        System.out.println("removeLanguage");
+        
+        int languageID = 0;
+        Service instance = null;
+        
+        instance.removeLanguage(languageID);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getParent method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testGetParent() {
+        System.out.println("getParent");
+        
+        Service instance = null;
+        
+        NbNodeObject expResult = null;
+        NbNodeObject result = instance.getParent();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getDisplayName method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testGetDisplayName() {
+        System.out.println("getDisplayName");
+        
+        Service instance = null;
+        
+        String expResult = "";
+        String result = instance.getDisplayName();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getAllSubObjects method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testGetAllSubObjects() {
+        System.out.println("getAllSubObjects");
+        
+        Service instance = null;
+        
+        NbNodeObject[] expResult = null;
+        NbNodeObject[] result = instance.getAllSubObjects();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of createProperties method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testCreateProperties() {
+        System.out.println("createProperties");
+        
+        Sheet sheet = null;
+        PropertyChangeListener listener = null;
+        Service instance = null;
+        
+        Node.Property[] expResult = null;
+        Node.Property[] result = instance.createProperties(sheet, listener);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of hasActions method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testHasActions() {
+        System.out.println("hasActions");
+        
+        int type = 0;
+        Service instance = null;
+        
+        boolean expResult = true;
+        boolean result = instance.hasActions(type);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getActions method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testGetActions() {
+        System.out.println("getActions");
+        
+        boolean context = true;
+        Service instance = null;
+        
+        Action[] expResult = null;
+        Action[] result = instance.getActions(context);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of setActions method, of class org.openoffice.extensions.util.datamodel.Service.
+     */
+    public void testSetActions() {
+        System.out.println("setActions");
+        
+        BaseAction actions = null;
+        Service instance = null;
+        
+        instance.setActions(actions);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/StructTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/StructTest.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/StructTest.java (added)
+++ incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/StructTest.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,320 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: StructTest.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/09/04 15:06:45 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.util.datamodel;
+
+import junit.framework.*;
+import java.beans.PropertyChangeListener;
+import java.util.Enumeration;
+import java.util.Vector;
+import javax.swing.Action;
+import org.openide.nodes.Node;
+import org.openide.nodes.Sheet;
+import org.openide.util.NbBundle;
+import org.openoffice.extensions.projecttemplates.calcaddin.AddinWizardIterator;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.datamodel.actions.BaseAction;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.SimpleOpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.UnknownOpenOfficeOrgLanguageIDException;
+
+/**
+ *
+ * @author sg128468
+ */
+public class StructTest extends TestCase {
+    
+    public StructTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+    }
+
+    protected void tearDown() throws Exception {
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(StructTest.class);
+        
+        return suite;
+    }
+
+    /**
+     * Test of getStructType method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testGetStructType() {
+        System.out.println("getStructType");
+        
+        String name = "";
+        Struct instance = null;
+        
+        Parameter expResult = null;
+        Parameter result = instance.getStructType(name);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of addStructType method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testAddStructType() {
+        System.out.println("addStructType");
+        
+        Struct instance = null;
+        
+        Parameter expResult = null;
+        Parameter result = instance.addStructType();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of removeStructType method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testRemoveStructType() {
+        System.out.println("removeStructType");
+        
+        String name = "";
+        Struct instance = null;
+        
+        instance.removeStructType(name);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getAllSetObjectNames method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testGetAllSetObjectNames() {
+        System.out.println("getAllSetObjectNames");
+        
+        Struct instance = null;
+        
+        String[] expResult = null;
+        String[] result = instance.getAllSetObjectNames();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getSetObject method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testGetSetObject() {
+        System.out.println("getSetObject");
+        
+        String internalName = "";
+        Struct instance = null;
+        
+        Object expResult = null;
+        Object result = instance.getSetObject(internalName);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of addSetObject method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testAddSetObject() {
+        System.out.println("addSetObject");
+        
+        String internalName = "";
+        Object setObject = null;
+        Struct instance = null;
+        
+        instance.addSetObject(internalName, setObject);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getDisplayName method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testGetDisplayName() {
+        System.out.println("getDisplayName");
+        
+        Struct instance = null;
+        
+        String expResult = "";
+        String result = instance.getDisplayName();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getAllSubObjects method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testGetAllSubObjects() {
+        System.out.println("getAllSubObjects");
+        
+        Struct instance = null;
+        
+        NbNodeObject[] expResult = null;
+        NbNodeObject[] result = instance.getAllSubObjects();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getProperty method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testGetProperty() {
+        System.out.println("getProperty");
+        
+        int propertyIndex = 0;
+        Struct instance = null;
+        
+        OpenOfficeOrgProperty expResult = null;
+        OpenOfficeOrgProperty result = instance.getProperty(propertyIndex);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of createProperties method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testCreateProperties() {
+        System.out.println("createProperties");
+        
+        Sheet sheet = null;
+        PropertyChangeListener listener = null;
+        Struct instance = null;
+        
+        Node.Property[] expResult = null;
+        Node.Property[] result = instance.createProperties(sheet, listener);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of hasActions method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testHasActions() {
+        System.out.println("hasActions");
+        
+        int type = 0;
+        Struct instance = null;
+        
+        boolean expResult = true;
+        boolean result = instance.hasActions(type);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getActions method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testGetActions() {
+        System.out.println("getActions");
+        
+        boolean b = true;
+        Struct instance = null;
+        
+        Action[] expResult = null;
+        Action[] result = instance.getActions(b);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of setActions method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testSetActions() {
+        System.out.println("setActions");
+        
+        BaseAction baseAction = null;
+        Struct instance = null;
+        
+        instance.setActions(baseAction);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getParent method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testGetParent() {
+        System.out.println("getParent");
+        
+        Struct instance = null;
+        
+        NbNodeObject expResult = null;
+        NbNodeObject result = instance.getParent();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getType method, of class org.openoffice.extensions.util.datamodel.Struct.
+     */
+    public void testGetType() {
+        System.out.println("getType");
+        
+        Struct instance = null;
+        
+        int expResult = 0;
+        int result = instance.getType();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/TemplateTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/TemplateTypeTest.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/TemplateTypeTest.java (added)
+++ incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/TemplateTypeTest.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,225 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: TemplateTypeTest.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/09/04 15:06:44 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.util.datamodel;
+
+import junit.framework.*;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyEditor;
+import java.util.Arrays;
+import java.util.Vector;
+import javax.swing.Action;
+import org.openide.nodes.Node;
+import org.openide.nodes.Sheet;
+import org.openide.util.NbBundle;
+import org.openoffice.extensions.projecttemplates.calcaddin.AddinWizardIterator;
+import org.openoffice.extensions.projecttemplates.component.datamodel.types.node.ComponentTypePropertyEditor;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.datamodel.actions.BaseAction;
+import org.openoffice.extensions.util.datamodel.properties.OpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.SimpleOpenOfficeOrgProperty;
+import org.openoffice.extensions.util.datamodel.properties.UnknownOpenOfficeOrgLanguageIDException;
+
+/**
+ *
+ * @author sg128468
+ */
+public class TemplateTypeTest extends TestCase {
+    
+    public TemplateTypeTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+    }
+
+    protected void tearDown() throws Exception {
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(TemplateTypeTest.class);
+        
+        return suite;
+    }
+
+    /**
+     * Test of getDisplayName method, of class org.openoffice.extensions.util.datamodel.TemplateType.
+     */
+    public void testGetDisplayName() {
+        System.out.println("getDisplayName");
+        
+        TemplateType instance = null;
+        
+        String expResult = "";
+        String result = instance.getDisplayName();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getProperty method, of class org.openoffice.extensions.util.datamodel.TemplateType.
+     */
+    public void testGetProperty() {
+        System.out.println("getProperty");
+        
+        int propertyIndex = 0;
+        TemplateType instance = null;
+        
+        OpenOfficeOrgProperty expResult = null;
+        OpenOfficeOrgProperty result = instance.getProperty(propertyIndex);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getAllSubObjects method, of class org.openoffice.extensions.util.datamodel.TemplateType.
+     */
+    public void testGetAllSubObjects() {
+        System.out.println("getAllSubObjects");
+        
+        TemplateType instance = null;
+        
+        NbNodeObject[] expResult = null;
+        NbNodeObject[] result = instance.getAllSubObjects();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of createProperties method, of class org.openoffice.extensions.util.datamodel.TemplateType.
+     */
+    public void testCreateProperties() {
+        System.out.println("createProperties");
+        
+        Sheet sheet = null;
+        PropertyChangeListener listener = null;
+        TemplateType instance = null;
+        
+        Node.Property[] expResult = null;
+        Node.Property[] result = instance.createProperties(sheet, listener);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of setActions method, of class org.openoffice.extensions.util.datamodel.TemplateType.
+     */
+    public void testSetActions() {
+        System.out.println("setActions");
+        
+        BaseAction baseAction = null;
+        TemplateType instance = null;
+        
+        instance.setActions(baseAction);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getActions method, of class org.openoffice.extensions.util.datamodel.TemplateType.
+     */
+    public void testGetActions() {
+        System.out.println("getActions");
+        
+        boolean b = true;
+        TemplateType instance = null;
+        
+        Action[] expResult = null;
+        Action[] result = instance.getActions(b);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of hasActions method, of class org.openoffice.extensions.util.datamodel.TemplateType.
+     */
+    public void testHasActions() {
+        System.out.println("hasActions");
+        
+        int type = 0;
+        TemplateType instance = null;
+        
+        boolean expResult = true;
+        boolean result = instance.hasActions(type);
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getParent method, of class org.openoffice.extensions.util.datamodel.TemplateType.
+     */
+    public void testGetParent() {
+        System.out.println("getParent");
+        
+        TemplateType instance = null;
+        
+        NbNodeObject expResult = null;
+        NbNodeObject result = instance.getParent();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+
+    /**
+     * Test of getType method, of class org.openoffice.extensions.util.datamodel.TemplateType.
+     */
+    public void testGetType() {
+        System.out.println("getType");
+        
+        TemplateType instance = null;
+        
+        int expResult = 0;
+        int result = instance.getType();
+        assertEquals(expResult, result);
+        
+        // TODO review the generated test code and remove the default call to fail.
+        fail("The test case is a prototype.");
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/localization/LanguageDefinitionTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/localization/LanguageDefinitionTest.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/localization/LanguageDefinitionTest.java (added)
+++ incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/localization/LanguageDefinitionTest.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,243 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: LanguageDefinitionTest.java,v $
+ *
+ *  $Revision: 1.2 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/07/31 15:45:13 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.util.datamodel.localization;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author sg128468
+ */
+public class LanguageDefinitionTest extends TestCase {
+    
+    public LanguageDefinitionTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+    }
+
+    protected void tearDown() throws Exception {
+    }
+
+    /**
+     * Test of getLanguages method, of class org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.
+     */
+    public void testGetLanguages() {
+        System.out.println("getLanguages");
+        
+        String[] result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguages();
+        assertNotNull(result);
+
+        String[] result2 = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguagesShortName();
+        assertEquals(result2.length, result.length);
+    }
+
+    /**
+     * Test of getLanguagesShortName method, of class org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.
+     */
+    public void testGetLanguagesShortName() {
+        System.out.println("getLanguagesShortName");
+        
+        String[] result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguagesShortName();
+        assertNotNull(result);
+    }
+
+    /**
+     * Test of getLanguageIdForName method, of class org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.
+     */
+    public void testGetLanguageIdForName() {
+        System.out.println("getLanguageIdForName");
+        
+        String languageName = "English(en)";
+        int expResult = 15;
+        int result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageIdForName(languageName);
+        assertEquals(expResult, result);
+
+        languageName = "Albanian(sq)";
+        expResult = 0;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageIdForName(languageName);
+        assertEquals(expResult, result);
+        
+        languageName = "Welsh(cy)";
+        expResult = 66;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageIdForName(languageName);
+        assertEquals(expResult, result);
+
+        languageName = "Blabla";
+        expResult = -1;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageIdForName(languageName);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of getLanguageIdForShortName method, of class org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.
+     */
+    public void testGetLanguageIdForShortName() {
+        System.out.println("getLanguageIdForShortName");
+        
+        String shortName = "en";
+        int expResult = 15;
+        int result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageIdForShortName(shortName);
+        assertEquals(expResult, result);
+        
+        shortName = "sq";
+        expResult = 0;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageIdForShortName(shortName);
+        assertEquals(expResult, result);
+        
+        shortName = "cy";
+        expResult = 66;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageIdForShortName(shortName);
+        assertEquals(expResult, result);
+        
+        shortName = "blabla";
+        expResult = -1;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageIdForShortName(shortName);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of getLanguageNameForId method, of class org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.
+     */
+    public void testGetLanguageNameForId() {
+        System.out.println("getLanguageNameForId");
+        
+        String expResult = "English(en)";
+        int id = 15;
+        String result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageNameForId(id);
+        assertEquals(expResult, result);
+
+        expResult = "Albanian(sq)";
+        id = 0;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageNameForId(id);
+        assertEquals(expResult, result);
+        
+        expResult = "Welsh(cy)";
+        id = 66;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageNameForId(id);
+        assertEquals(expResult, result);
+
+        id = -1;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageNameForId(id);
+        assertNull(result);
+    }
+
+    /**
+     * Test of getLanguageShortNameForId method, of class org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.
+     */
+    public void testGetLanguageShortNameForId() {
+        System.out.println("getLanguageShortNameForId");
+        
+        String expResult = "en";
+        int id = 15;
+        String result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageShortNameForId(id);
+        assertEquals(expResult, result);
+
+        expResult = "sq";
+        id = 0;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageShortNameForId(id);
+        assertEquals(expResult, result);
+        
+        expResult = "cy";
+        id = 66;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageShortNameForId(id);
+        assertEquals(expResult, result);
+
+        id = -1;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageShortNameForId(id);
+        assertNull(result);
+        
+    }
+
+    /**
+     * Test of hasLanguage method, of class org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.
+     */
+    public void testHasLanguage() {
+        System.out.println("hasLanguage");
+        
+        int langID = 25;
+        boolean expResult = true;
+        boolean result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.hasLanguage(langID);
+        assertEquals(expResult, result);
+        
+        langID = -15;
+        expResult = false;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.hasLanguage(langID);
+        assertEquals(expResult, result);
+        
+        langID = 678;
+        expResult = false;
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.hasLanguage(langID);
+        assertEquals(expResult, result);
+        
+    }
+
+    /**
+     * Test of getLanguageNameForShortName method, of class org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.
+     */
+    public void testGetLanguageNameForShortName() {
+        System.out.println("getLanguageNameForShortName");
+        
+        String languageShortName = "en";
+        String expResult = "English(en)";
+        String result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageNameForShortName(languageShortName);
+        assertEquals(expResult, result);
+
+        languageShortName = "sq";
+        expResult = "Albanian(sq)";
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageNameForShortName(languageShortName);
+        assertEquals(expResult, result);
+        
+        languageShortName = "cy";
+        expResult = "Welsh(cy)";
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageNameForShortName(languageShortName);
+        assertEquals(expResult, result);
+
+        languageShortName = "blabla";
+        result = org.openoffice.extensions.util.datamodel.localization.LanguageDefinition.getLanguageNameForShortName(languageShortName);
+        assertNull(result);
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(LanguageDefinitionTest.class);
+        
+        return suite;
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/localization/LocalizationSuite.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/localization/LocalizationSuite.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/localization/LocalizationSuite.java (added)
+++ incubator/ooo/devtools/netbeansintegration/test/unit/src/org/openoffice/extensions/util/datamodel/localization/LocalizationSuite.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: LocalizationSuite.java,v $
+ *
+ *  $Revision: 1.2 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/07/31 15:45:13 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.util.datamodel.localization;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+
+/**
+ *
+ * @author sg128468
+ */
+public class LocalizationSuite extends TestCase {
+    
+    public LocalizationSuite(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+    }
+
+    protected void tearDown() throws Exception {
+    }
+
+    /**
+     * suite method automatically generated by JUnit module
+     */
+    public static Test suite() {
+        TestSuite suite = new TestSuite("LocalizationSuite");
+        suite.addTest(org.openoffice.extensions.util.datamodel.localization.LanguageDefinitionTest.suite());
+        return suite;
+    }
+    
+}



Mime
View raw message