Commit 4a0ba728 authored by Gwenael Cattez's avatar Gwenael Cattez

Generic tests for RMI, REST, WS BindingProcessor

parent a2fb7559
...@@ -187,6 +187,31 @@ ...@@ -187,6 +187,31 @@
<!-- <overWrite>true</overWrite> --> <!-- <overWrite>true</overWrite> -->
<!-- <destFileName>helloworld-binding-sca.zip</destFileName> --> <!-- <destFileName>helloworld-binding-sca.zip</destFileName> -->
<!-- </artifactItem> --> <!-- </artifactItem> -->
<!-- <artifactItem> -->
<!-- <groupId>org.ow2.frascati.examples</groupId> -->
<!-- <artifactId>helloworld-rmi-contribution</artifactId> -->
<!-- <version>1.5-SNAPSHOT</version> -->
<!-- <type>zip</type> -->
<!-- <classifier>frascati-contribution</classifier> -->
<!-- <overWrite>true</overWrite> -->
<!-- <destFileName>helloworld-rmi.zip</destFileName> -->
<!-- </artifactItem> -->
<artifactItem>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>helloworld-ws-server</artifactId>
<version>1.5-SNAPSHOT</version>
<type>jar</type>
<overWrite>true</overWrite>
<destFileName>helloworld-ws-server.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>helloworld-ws-client</artifactId>
<version>1.5-SNAPSHOT</version>
<type>jar</type>
<overWrite>true</overWrite>
<destFileName>helloworld-ws-client.jar</destFileName>
</artifactItem>
</artifactItems> </artifactItems>
</configuration> </configuration>
</execution> </execution>
......
...@@ -31,9 +31,6 @@ import static org.junit.Assert.assertEquals; ...@@ -31,9 +31,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.util.List;
import org.eclipse.stp.sca.JMSBinding;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.objectweb.fractal.api.Interface; import org.objectweb.fractal.api.Interface;
...@@ -44,11 +41,11 @@ import org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindin ...@@ -44,11 +41,11 @@ import org.ow2.frascati.remote.introspection.binding.exception.UnsupportedBindin
import org.ow2.frascati.remote.introspection.binding.processor.BindingProcessorItf; import org.ow2.frascati.remote.introspection.binding.processor.BindingProcessorItf;
import org.ow2.frascati.remote.introspection.binding.processor.BindingProcessorTest; import org.ow2.frascati.remote.introspection.binding.processor.BindingProcessorTest;
import org.ow2.frascati.remote.introspection.binding.processor.JMSBindingProcessorTest; import org.ow2.frascati.remote.introspection.binding.processor.JMSBindingProcessorTest;
import org.ow2.frascati.remote.introspection.binding.processor.JSONRPCBindingProcessor;
import org.ow2.frascati.remote.introspection.binding.processor.JSONRPCBindingProcessorTest; import org.ow2.frascati.remote.introspection.binding.processor.JSONRPCBindingProcessorTest;
import org.ow2.frascati.remote.introspection.binding.processor.RESTBindingProcessorTest; import org.ow2.frascati.remote.introspection.binding.processor.RESTBindingProcessorTest;
import org.ow2.frascati.remote.introspection.binding.processor.SCABindingProcessorTest; import org.ow2.frascati.remote.introspection.binding.processor.SCABindingProcessorTest;
import org.ow2.frascati.remote.introspection.binding.processor.UPnPBindingProcessorTest; import org.ow2.frascati.remote.introspection.binding.processor.UPnPBindingProcessorTest;
import org.ow2.frascati.remote.introspection.binding.processor.WSBindingProcessorTest;
import org.ow2.frascati.remote.introspection.resources.BindingKind; import org.ow2.frascati.remote.introspection.resources.BindingKind;
import org.ow2.frascati.remote.introspection.util.FractalUtilItf; import org.ow2.frascati.remote.introspection.util.FractalUtilItf;
...@@ -194,6 +191,28 @@ public class BindingManagerTest ...@@ -194,6 +191,28 @@ public class BindingManagerTest
restBindingProcessorTest.finishTest(); restBindingProcessorTest.finishTest();
} }
@Test
public void rmiBindingProcessor() throws NoSuchInterfaceException, UnsupportedBindingComponentException, UnsupportedBindingException
{
SCABindingProcessorTest scaBindingProcessorTest=new SCABindingProcessorTest();
scaBindingProcessorTest.initTest(fractalUtil);
this.getBindinProcessor(scaBindingProcessorTest);
this.getClientBindingBundle(scaBindingProcessorTest);
//TODO RMI server is not proceed
scaBindingProcessorTest.finishTest();
}
@Test
public void scaBindingProcessor() throws NoSuchInterfaceException, UnsupportedBindingComponentException, UnsupportedBindingException
{
SCABindingProcessorTest scaBindingProcessorTest=new SCABindingProcessorTest();
scaBindingProcessorTest.initTest(fractalUtil);
this.getBindinProcessor(scaBindingProcessorTest);
this.getClientBindingBundle(scaBindingProcessorTest);
/**SCA binding on a service is a non sense*/
scaBindingProcessorTest.finishTest();
}
@Test @Test
public void upnpBindingProcessor() throws NoSuchInterfaceException, UnsupportedBindingComponentException, UnsupportedBindingException public void upnpBindingProcessor() throws NoSuchInterfaceException, UnsupportedBindingComponentException, UnsupportedBindingException
{ {
...@@ -204,14 +223,19 @@ public class BindingManagerTest ...@@ -204,14 +223,19 @@ public class BindingManagerTest
this.getServerBindingBundle(upnpBindingProcessorTest); this.getServerBindingBundle(upnpBindingProcessorTest);
upnpBindingProcessorTest.finishTest(); upnpBindingProcessorTest.finishTest();
} }
@Test
public void wsBindingProcessor() throws NoSuchInterfaceException, UnsupportedBindingComponentException, UnsupportedBindingException
{
WSBindingProcessorTest upnpBindingProcessorTest=new WSBindingProcessorTest();
upnpBindingProcessorTest.initTest(fractalUtil);
this.getBindinProcessor(upnpBindingProcessorTest);
this.getClientBindingBundle(upnpBindingProcessorTest);
this.getServerBindingBundle(upnpBindingProcessorTest);
upnpBindingProcessorTest.finishTest();
}
@Test
public void scaBindingProcessor() throws NoSuchInterfaceException, UnsupportedBindingComponentException, UnsupportedBindingException
{
SCABindingProcessorTest scaBindingProcessorTest=new SCABindingProcessorTest();
scaBindingProcessorTest.initTest(fractalUtil);
this.getBindinProcessor(scaBindingProcessorTest);
this.getClientBindingBundle(scaBindingProcessorTest);
scaBindingProcessorTest.finishTest();
}
} }
/**
* OW2 FraSCAti
* Copyright (C) 2013 Inria, University of Lille 1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* 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
*
* Contact: frascati@ow2.org
*
* Author: Gwenael Cattez
*
* Contributor(s):
*
*/
package org.ow2.frascati.remote.introspection.binding.processor;
import java.util.ArrayList;
import java.util.List;
import org.ow2.frascati.remote.introspection.resources.BindingKind;
/**
*
*/
public class RMIPBindingProcessorTest extends BindingProcessorTest
{
/**
* @param bindingKind
* @param serverInterfacePath
* @param clientInterfacePath
*/
public RMIPBindingProcessorTest()
{
super(BindingKind.RMI, "ServerRMI/server/s","ClientRMI/client/printService");
}
@Override
protected List<String> getContributionsToDeploy()
{
List<String> contributionToDeploy=new ArrayList<String>();
contributionToDeploy.add("helloworld-rmi");
return contributionToDeploy;
}
}
/**
* OW2 FraSCAti
* Copyright (C) 2013 Inria, University of Lille 1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* 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
*
* Contact: frascati@ow2.org
*
* Author: Gwenael Cattez
*
* Contributor(s):
*
*/
package org.ow2.frascati.remote.introspection.binding.processor;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.ow2.frascati.remote.introspection.resources.BindingKind;
/**
*
*/
public class WSBindingProcessorTest extends BindingProcessorTest
{
/**
* @param bindingKind
* @param serverInterfacePath
* @param clientInterfacePath
*/
public WSBindingProcessorTest()
{
super(BindingKind.WS, "helloworld-ws-server/s","helloworld-ws-client/client/printService");
}
@Override
protected Map<String,String> getCompositesToDeploy()
{
HashMap<String, String> compositesToDeploy=new HashMap<String, String>();
compositesToDeploy.put("helloworld-ws-server", "helloworld-ws-server");
compositesToDeploy.put("helloworld-ws-client", "helloworld-ws-client");
return compositesToDeploy;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment