Tests did not work, so they have been removed

git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@450623 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/IntrospectorTestHarness.java b/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/IntrospectorTestHarness.java
deleted file mode 100644
index 888a360..0000000
--- a/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/IntrospectorTestHarness.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- *   Copyright 2005 The Apache Software Foundation

- *

- *   Licensed under the Apache License, Version 2.0 (the "License");

- *   you may not use this file except in compliance with the License.

- *   You may obtain a copy of the License at

- *

- *       http://www.apache.org/licenses/LICENSE-2.0

- *

- *   Unless required by applicable law or agreed to in writing, software

- *   distributed under the License is distributed on an "AS IS" BASIS,

- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- *   See the License for the specific language governing permissions and

- *   limitations under the License.

- *

- */

-

-package org.apache.felix.jmxintrospector;

-

-import java.lang.management.ManagementFactory;

-import java.rmi.registry.LocateRegistry;

-import java.rmi.registry.Registry;

-import java.rmi.server.UnicastRemoteObject;

-import java.util.logging.Logger;

-

-import javax.management.MBeanServer;

-import javax.management.MBeanServerConnection;

-import javax.management.ObjectName;

-import javax.management.remote.JMXConnectorServer;

-import javax.management.remote.JMXConnectorServerFactory;

-import javax.management.remote.JMXServiceURL;

-

-

-

-import junit.framework.TestCase;

-

-public class IntrospectorTestHarness extends TestCase {

-	Logger logger=Logger.getLogger(this.getClass().getName());

-	MBeanServerConnection mbs;

-	MBeanProxyManager proxyManager;

-	JMXConnectorServer jmxServer;

-	Registry registry;

-	ObjectName testName;

-	@Override

-	protected void setUp() throws Exception {

-		super.setUp();

-		mbs = ManagementFactory.getPlatformMBeanServer();

-		JMXServiceURL u=new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1099/server");

-        registry=LocateRegistry.createRegistry(1099);

-		jmxServer=JMXConnectorServerFactory.newJMXConnectorServer(u, null, (MBeanServer)mbs);

-		testName=ObjectName.getInstance("test:name="+this.getClass().getName());

-		((MBeanServer)mbs).registerMBean(jmxServer, testName);

-		jmxServer.start();

-		proxyManager=new MBeanProxyManager();

-		proxyManager.addRemoteServer(u.toString());

-		

-	}

-	@Override

-	protected void tearDown() throws Exception {

-		super.tearDown();

-		jmxServer.stop();

-		((MBeanServer)mbs).unregisterMBean(testName);

-		UnicastRemoteObject.unexportObject(registry, true);

-	}

-}

diff --git a/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/MBeanProxyFactoryTestCase.java b/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/MBeanProxyFactoryTestCase.java
deleted file mode 100644
index 8bde9fb..0000000
--- a/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/MBeanProxyFactoryTestCase.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- *   Copyright 2005 The Apache Software Foundation

- *

- *   Licensed under the Apache License, Version 2.0 (the "License");

- *   you may not use this file except in compliance with the License.

- *   You may obtain a copy of the License at

- *

- *       http://www.apache.org/licenses/LICENSE-2.0

- *

- *   Unless required by applicable law or agreed to in writing, software

- *   distributed under the License is distributed on an "AS IS" BASIS,

- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- *   See the License for the specific language governing permissions and

- *   limitations under the License.

- *

- */

-

-package org.apache.felix.jmxintrospector;

-

-import java.lang.management.ManagementFactory;

-import java.util.Set;

-import java.util.logging.Logger;

-

-import javax.management.MBeanServerConnection;

-import javax.management.ObjectName;

-

-import junit.framework.TestCase;

-

-public class MBeanProxyFactoryTestCase extends IntrospectorTestHarness {

-

-	MBeanProxyFactory factory;

-

-	@Override

-	protected void setUp() throws Exception {

-		super.setUp();

-		factory = new MBeanProxyFactory(mbs);

-	}

-

-	public void testNewProxyInstance() throws Exception{

-		Set<ObjectName> onames = mbs.queryNames(ObjectName.WILDCARD, null);

-		for (ObjectName name : onames) {

-				Object mbean=factory.newProxyInstance(name.toString());

-				assertTrue(mbean instanceof MBean);

-				logger.info(((MBean)mbean).getObjectName());

-		}

-	}

-}

diff --git a/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/OutOfProcessTestHarness.java b/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/OutOfProcessTestHarness.java
deleted file mode 100644
index 14cc269..0000000
--- a/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/OutOfProcessTestHarness.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- *   Copyright 2005 The Apache Software Foundation

- *

- *   Licensed under the Apache License, Version 2.0 (the "License");

- *   you may not use this file except in compliance with the License.

- *   You may obtain a copy of the License at

- *

- *       http://www.apache.org/licenses/LICENSE-2.0

- *

- *   Unless required by applicable law or agreed to in writing, software

- *   distributed under the License is distributed on an "AS IS" BASIS,

- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- *   See the License for the specific language governing permissions and

- *   limitations under the License.

- *

- */

-

-package org.apache.felix.jmxintrospector;

-

-import java.lang.management.ManagementFactory;

-import java.rmi.registry.LocateRegistry;

-import java.rmi.registry.Registry;

-import java.rmi.server.UnicastRemoteObject;

-import java.util.logging.Logger;

-

-import javax.management.MBeanServer;

-import javax.management.MBeanServerConnection;

-import javax.management.ObjectName;

-import javax.management.remote.JMXConnectorFactory;

-import javax.management.remote.JMXConnectorServer;

-import javax.management.remote.JMXConnectorServerFactory;

-import javax.management.remote.JMXServiceURL;

-

-import junit.framework.TestCase;

-

-public class OutOfProcessTestHarness extends TestCase {

-	Logger logger=Logger.getLogger(this.getClass().getName());

-	MBeanServerConnection mbs;

-	MBeanProxyManager proxyManager;

-	ObjectName testName;

-	@Override

-	protected void setUp() throws Exception {

-		super.setUp();

-		JMXServiceURL u=new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1199/server");

-		mbs=JMXConnectorFactory.connect(u).getMBeanServerConnection();

-		proxyManager=new MBeanProxyManager();

-		proxyManager.addRemoteServer(u.toString());

-		

-	}

-	@Override

-	protected void tearDown() throws Exception {

-		super.tearDown();

-	}

-}

diff --git a/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/RemoteMBeanProxyFactoryTestCase.java b/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/RemoteMBeanProxyFactoryTestCase.java
deleted file mode 100644
index c1fb215..0000000
--- a/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/RemoteMBeanProxyFactoryTestCase.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- *   Copyright 2005 The Apache Software Foundation

- *

- *   Licensed under the Apache License, Version 2.0 (the "License");

- *   you may not use this file except in compliance with the License.

- *   You may obtain a copy of the License at

- *

- *       http://www.apache.org/licenses/LICENSE-2.0

- *

- *   Unless required by applicable law or agreed to in writing, software

- *   distributed under the License is distributed on an "AS IS" BASIS,

- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- *   See the License for the specific language governing permissions and

- *   limitations under the License.

- *

- */

-package org.apache.felix.jmxintrospector;

-

-/**

- * @author mili

- *

- */

-public class RemoteMBeanProxyFactoryTestCase extends MBeanProxyFactoryTestCase{

-

-	/* (non-Javadoc)

-	 * @see org.apache.felix.jmxintrospector.MBeanProxyFactoryTestCase#setUp()

-	 */

-	@Override

-	protected void setUp() throws Exception {

-		OutOfProcessTestHarness t=new OutOfProcessTestHarness();

-		t.setUp();

-		mbs=t.mbs;

-		factory=new MBeanProxyFactory(mbs);

-		

-	}

-

-	/* (non-Javadoc)

-	 * @see org.apache.felix.jmxintrospector.IntrospectorTestHarness#tearDown()

-	 */

-	@Override

-	protected void tearDown() throws Exception {

-	}

-	

-

-}

diff --git a/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/ScriptTestCase.java b/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/ScriptTestCase.java
deleted file mode 100644
index a88ab79..0000000
--- a/jmxintrospector/src/test/java/org/apache/felix/jmxintrospector/ScriptTestCase.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*

- *   Copyright 2005 The Apache Software Foundation

- *

- *   Licensed under the Apache License, Version 2.0 (the "License");

- *   you may not use this file except in compliance with the License.

- *   You may obtain a copy of the License at

- *

- *       http://www.apache.org/licenses/LICENSE-2.0

- *

- *   Unless required by applicable law or agreed to in writing, software

- *   distributed under the License is distributed on an "AS IS" BASIS,

- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- *   See the License for the specific language governing permissions and

- *   limitations under the License.

- *

- */

-

-package org.apache.felix.jmxintrospector;

-

-import java.lang.management.ManagementFactory;

-import java.util.List;

-import java.util.logging.Logger;

-

-import javax.management.MBeanServerConnection;

-import javax.script.ScriptEngine;

-import javax.script.ScriptEngineManager;

-

-import junit.framework.TestCase;

-

-public class ScriptTestCase extends IntrospectorTestHarness {

-	Logger logger=Logger.getLogger(this.getClass().getName());

-	ScriptEngineManager engineManager;

-	@Override

-	protected void setUp() throws Exception {

-		super.setUp();

-		engineManager=new ScriptEngineManager();

-		engineManager.put("manager", proxyManager);

-	}

-	public void testRuby() throws Exception{

-		fail("Not implemented");

-	}

-	public void testJavascript() throws Exception{

-		ScriptEngine js=engineManager.getEngineByName("javascript");

-		//results are the same, but may have different hash

-		List<Object> objectsInJava=proxyManager.getObjects();

-		List<Object> objectsInJS=(List<Object>) js.eval("manager.getObjects()");

-		for (Object objectJS : objectsInJS) {

-			Object javaPeer=null;

-			for (Object objectJava : objectsInJava) {

-				if (((MBean)objectJava).getObjectName().equals(((MBean)objectJS).getObjectName()))

-				javaPeer=objectJava;

-			}

-			assertNotNull(javaPeer);

-			System.out.println(javaPeer+";"+ objectJS);

-			assertEquals(javaPeer.getClass(), objectJS.getClass());

-			assertEquals(javaPeer, objectJS);//BUG in MBeanProxyFactory$JMXInvocationHandler

-

-		}

-		

-		

-	}

-	

-}