Commit 4f97e444 authored by Lionel Seinturier's avatar Lionel Seinturier

Remove no longer supported execution with recent versions of the JDK.

parent 41716aad
/***
* OW2 FraSCAti Tinfi
* Copyright (C) 2009-2017 Inria, Univ. 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: Lionel Seinturier
*/
package example.hw;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.NoSuchInterfaceException;
import org.objectweb.fractal.api.control.IllegalLifeCycleException;
import org.objectweb.fractal.api.factory.InstantiationException;
import org.objectweb.fractal.juliac.osgi.OSGiHelper;
import org.ow2.frascati.tinfi.TinfiDomain;
import example.hw.itf.Console;
/**
* Automate the launching of the HelloWorld example and check that the example
* runs as expected.
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @since 0.4.5
*/
public class HelloWorldTestCase {
private Component root;
@Before
public void setUp()
throws
ClassNotFoundException, InstantiationException, IllegalAccessException,
IllegalLifeCycleException, NoSuchInterfaceException,
java.lang.InstantiationException {
// Instanciate the HelloWorld composite
root = TinfiDomain.getComponent("example.hw.HelloWorld");
}
@After
public void tearDown()
throws
org.objectweb.fractal.juliac.osgi.revision.OSGiRevisionException {
OSGiHelper.getPlatform().stop();
}
@Test
public void serverHelloWorld() throws NoSuchInterfaceException {
/*
* Use the Console class to direct the output of the example to a
* temporary file.
*/
Console.init(
System.err,
new String[]{
"Server: begin printing...",
"->hello world",
"Server: print done.",
});
/*
* Run the test.
*/
Runnable r = (Runnable) root.getFcInterface("r");
r.run();
}
}
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