org.eclipse.ecf/tests/bundles/org.eclipse.ecf.tests.sharedobject/src/org/eclipse/ecf/tests/sharedobject/AddTest.java
Parent Directory
|
Revision Log
Revision 1.1 -
(download)
(annotate)
Wed Dec 19 23:58:15 2007 UTC (23 months ago) by slewis
Branch: MAIN
CVS Tags: v20080329-1516, v20080618-1121, v20080914-1415, v20080211-1748, v20081217-0928, v20081008-1038, v20080530-1139, v20080611-1851, v20081216-1559, v20081008-1135, v20080105-1841, v20080130-1600, v20071225-1538, v20080503-0904, v20080305-1043, v20080310-1210, v20080510-1526, v20080914-1433, v20080510-1311, v20080611-1514, v20080911-1451, v20090128-1800, v20081116-1518, v20080811-0800, v20080328-1632, v20080530-1451, v20080429-1726, v20080328-1338, v20080623-0046, v20080527-1841, v20080510-1400, v20080329-1711, v20080518-1154, v20080527-1824, v20080102-2309, v20080514-1334, v20080714-0801, v20080403-2120, v20080528-1345, v20080526-0800, v20071227-1137, v20080609-0800, v20080603-1445, v20080529-1536, v20080417-1846, v20080328-2358, v20080611-1936, v20080612-0913, v20081103-0800, v20080328-2315, v20071227-1036, v20081106-2102, v20080922-0800, v20080612-1300, v20080516-0805, v20080516-1338, v20080509-1536, v20080916-1301, v20080505-0800, v20080609-1032, v20081027-0800, v20081013-0800, v20080327-1117, v20080521-0913, v20080130-0738, v20080514-1039, v20080518-1654, v20081008-1113, v20080410-2214, v20080513-0932, v20080529-1603, v20080404-1745, v20080331-1715, v20080125-2139, v20081208-1959, v20081207-1355, v20080102-1456, v20080616-0800, v20080310-1643, v20081224-1351, v20080404-1645, v20080728-0800, v20071227-1328, v20081223-0952, v20080104-1223, v20080521-1450, Release_2_0_HEAD, v20081009-1129, v20080518-1545, v20080314-1516, v20080328-2350, v20080211-2042, v20080225-1648, v20080528-2154, v20080607-1508, v20081110-0800, v20080225-1440, v20080622-2357, v20080315-2247, v20080611-1800, v20081117-0800, v20080616-0940, v20080222-2307, v20080305-1751, v20080521-0923, v20080421-0800, v20080607-1304, v20080329-1500, v20080315-1344, v20080329-1407, v20080607-1616, v20080302-1947, v20080615-2252, v20071221-1130, v20081006-2147, v20080609-1053, v20080612-1321, v20080603-1423, v20080125-2013, v20080319-2236, v20080607-1358, v20080721-0800, v20080314-2030, v20080125-2234, v20080622-1412, v20080611-1053, v20080611-1215, v20080514-1115, v20080511-2320, v20081208-2306, v20080222-2025, v20080622-2327, v20080611-0816, v20080707-0800, v20080611-2018, v20080607-2202, v20080521-1432, v20081020-0800, v20080529-0750, v20080308-1125, v20080105-1435, v20081006-2232, v20080513-0956, v20080605-1013, v20080416-1949, v20080401-2140, v20080804-0800, v20080616-1157, v20080208-1727, v20080324-0800, v20080429-1739, v20080329-1555, v20080611-1617, v20080607-1441, v20080618-1357, v20080331-0800, v20081217-1036, v20080417-1626, v20080515-2108, v20080911-1818, v20080518-1455, v20080611-1738, v20080911-2056, v20080911-2112, v20080329-1344, v20080507-1345, v20080611-1130, v20080915-0800, v20080607-1732, v20080821-1122, v20080205-1457, v20080914-1400, v20080611-1541, v20080205-1453, v20080302-1254, R21p2workaround_1, v20080506-1550, v20080303-1747, v20080616-1037, v20080329-1515, v20080416-1619, v20080428-0800, v20080611-2118, v20081006-2216, v20080515-2129, v20080107-1038, v20080506-2244, v20071225-1507, v20080418-1632, v20080530-1422, v20080315-2236, v20081222-1050, v20080105-1440, v20080603-1120, v20080612-0749, v20081223-0855, v20080623-0024, Root_Release_2_0, Root_Release_2_1, v20080317-0809, v20080608-2252, v20080302-0853, v20080512-0800, v20080521-0942, v20080530-1620, v20080429-2240, v20080131-1630, v20080416-2227, v20080914-1139, v20080406-1615, v20081007-1928, v20081224-1728, v20080530-1158, v20080121-1236, v20080611-1715, v20081208-2110, v20090222-2104, v20080611-2049, v20081208-0800, v20080603-1031, v20081116-1500, v20080611-1653, v20080302-2026, v20080908-0800, v20080615-2309, v20080611-1017, v20080521-2232, v20080305-2150, v20080528-1408, v20080616-1220, v20081224-1108, v20080519-0800, v20080414-0800, v20080605-1832
Branch point for: Release_2_0, Release_2_1
Wed Dec 19 23:58:15 2007 UTC (23 months ago) by slewis
Branch: MAIN
CVS Tags: v20080329-1516, v20080618-1121, v20080914-1415, v20080211-1748, v20081217-0928, v20081008-1038, v20080530-1139, v20080611-1851, v20081216-1559, v20081008-1135, v20080105-1841, v20080130-1600, v20071225-1538, v20080503-0904, v20080305-1043, v20080310-1210, v20080510-1526, v20080914-1433, v20080510-1311, v20080611-1514, v20080911-1451, v20090128-1800, v20081116-1518, v20080811-0800, v20080328-1632, v20080530-1451, v20080429-1726, v20080328-1338, v20080623-0046, v20080527-1841, v20080510-1400, v20080329-1711, v20080518-1154, v20080527-1824, v20080102-2309, v20080514-1334, v20080714-0801, v20080403-2120, v20080528-1345, v20080526-0800, v20071227-1137, v20080609-0800, v20080603-1445, v20080529-1536, v20080417-1846, v20080328-2358, v20080611-1936, v20080612-0913, v20081103-0800, v20080328-2315, v20071227-1036, v20081106-2102, v20080922-0800, v20080612-1300, v20080516-0805, v20080516-1338, v20080509-1536, v20080916-1301, v20080505-0800, v20080609-1032, v20081027-0800, v20081013-0800, v20080327-1117, v20080521-0913, v20080130-0738, v20080514-1039, v20080518-1654, v20081008-1113, v20080410-2214, v20080513-0932, v20080529-1603, v20080404-1745, v20080331-1715, v20080125-2139, v20081208-1959, v20081207-1355, v20080102-1456, v20080616-0800, v20080310-1643, v20081224-1351, v20080404-1645, v20080728-0800, v20071227-1328, v20081223-0952, v20080104-1223, v20080521-1450, Release_2_0_HEAD, v20081009-1129, v20080518-1545, v20080314-1516, v20080328-2350, v20080211-2042, v20080225-1648, v20080528-2154, v20080607-1508, v20081110-0800, v20080225-1440, v20080622-2357, v20080315-2247, v20080611-1800, v20081117-0800, v20080616-0940, v20080222-2307, v20080305-1751, v20080521-0923, v20080421-0800, v20080607-1304, v20080329-1500, v20080315-1344, v20080329-1407, v20080607-1616, v20080302-1947, v20080615-2252, v20071221-1130, v20081006-2147, v20080609-1053, v20080612-1321, v20080603-1423, v20080125-2013, v20080319-2236, v20080607-1358, v20080721-0800, v20080314-2030, v20080125-2234, v20080622-1412, v20080611-1053, v20080611-1215, v20080514-1115, v20080511-2320, v20081208-2306, v20080222-2025, v20080622-2327, v20080611-0816, v20080707-0800, v20080611-2018, v20080607-2202, v20080521-1432, v20081020-0800, v20080529-0750, v20080308-1125, v20080105-1435, v20081006-2232, v20080513-0956, v20080605-1013, v20080416-1949, v20080401-2140, v20080804-0800, v20080616-1157, v20080208-1727, v20080324-0800, v20080429-1739, v20080329-1555, v20080611-1617, v20080607-1441, v20080618-1357, v20080331-0800, v20081217-1036, v20080417-1626, v20080515-2108, v20080911-1818, v20080518-1455, v20080611-1738, v20080911-2056, v20080911-2112, v20080329-1344, v20080507-1345, v20080611-1130, v20080915-0800, v20080607-1732, v20080821-1122, v20080205-1457, v20080914-1400, v20080611-1541, v20080205-1453, v20080302-1254, R21p2workaround_1, v20080506-1550, v20080303-1747, v20080616-1037, v20080329-1515, v20080416-1619, v20080428-0800, v20080611-2118, v20081006-2216, v20080515-2129, v20080107-1038, v20080506-2244, v20071225-1507, v20080418-1632, v20080530-1422, v20080315-2236, v20081222-1050, v20080105-1440, v20080603-1120, v20080612-0749, v20081223-0855, v20080623-0024, Root_Release_2_0, Root_Release_2_1, v20080317-0809, v20080608-2252, v20080302-0853, v20080512-0800, v20080521-0942, v20080530-1620, v20080429-2240, v20080131-1630, v20080416-2227, v20080914-1139, v20080406-1615, v20081007-1928, v20081224-1728, v20080530-1158, v20080121-1236, v20080611-1715, v20081208-2110, v20090222-2104, v20080611-2049, v20081208-0800, v20080603-1031, v20081116-1500, v20080611-1653, v20080302-2026, v20080908-0800, v20080615-2309, v20080611-1017, v20080521-2232, v20080305-2150, v20080528-1408, v20080616-1220, v20081224-1108, v20080519-0800, v20080414-0800, v20080605-1832
Branch point for: Release_2_0, Release_2_1
Created AddTest to test the creation/add of shared object in context defined by container.
/**************************************************************************** * Copyright (c) 2007 Composent, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Composent, Inc. - initial API and implementation *****************************************************************************/ package org.eclipse.ecf.tests.sharedobject; import org.eclipse.ecf.core.IContainer; import org.eclipse.ecf.core.identity.ID; import org.eclipse.ecf.core.identity.IDFactory; import org.eclipse.ecf.core.sharedobject.ISharedObject; import org.eclipse.ecf.core.sharedobject.ISharedObjectContainer; import org.eclipse.ecf.core.sharedobject.ISharedObjectManager; import org.eclipse.ecf.tests.ContainerAbstractTestCase; /** * */ public class AddTest extends ContainerAbstractTestCase { public static final String SERVER_NAME = "ecftcp://localhost:5888/server"; public static final String TEST_USERNAME0 = "slewis"; public static final String TEST_USERNAME1 = "luca"; /* (non-Javadoc) * @see org.eclipse.ecf.tests.ContainerAbstractTestCase#getClientCount() */ protected int getClientCount() { return 2; } /* (non-Javadoc) * @see org.eclipse.ecf.tests.ContainerAbstractTestCase#setUp() */ protected void setUp() throws Exception { super.setUp(); createServerAndClients(); connectClients(); } /* (non-Javadoc) * @see junit.framework.TestCase#tearDown() */ protected void tearDown() throws Exception { super.tearDown(); cleanUpServerAndClients(); } public void testAddSharedObject() throws Exception { final IContainer client0Container = getClient(0); assertNotNull(client0Container); // final ISharedObjectContainer socontainer = (ISharedObjectContainer) client0Container.getAdapter(ISharedObjectContainer.class); final ISharedObjectManager manager = socontainer.getSharedObjectManager(); assertNotNull(manager); final ID id = manager.addSharedObject(IDFactory.getDefault().createStringID("foo"), new TestSharedObject(TEST_USERNAME0), null); assertNotNull(id); final ISharedObject sharedObject = manager.getSharedObject(id); assertNotNull(sharedObject); sleep(5000); } public void testAddTwoSharedObjects() throws Exception { final IContainer client0Container = getClient(0); assertNotNull(client0Container); final ISharedObjectContainer socontainer = (ISharedObjectContainer) client0Container.getAdapter(ISharedObjectContainer.class); final ISharedObjectManager manager = socontainer.getSharedObjectManager(); assertNotNull(manager); final ID id0 = manager.addSharedObject(IDFactory.getDefault().createStringID("foo0"), new TestSharedObject(TEST_USERNAME0), null); assertNotNull(id0); final ID id1 = manager.addSharedObject(IDFactory.getDefault().createStringID("foo1"), new TestSharedObject(TEST_USERNAME1), null); assertNotNull(id1); final ISharedObject sharedObject0 = manager.getSharedObject(id0); assertNotNull(sharedObject0); final ISharedObject sharedObject1 = manager.getSharedObject(id1); assertNotNull(sharedObject1); sleep(5000); } }
| help@eclipse.org | ViewVC Help |
| Powered by ViewVC 1.0.3 |
