Commit c92dd3f2 authored by Gwenael Cattez's avatar Gwenael Cattez
Browse files

Add test to VideoScreen mocked

Expose GUI service of light and switch mocked component as WS for Daniel's demo
parent fa0cce67
......@@ -32,15 +32,20 @@
<property name="onIconPath">images/light_on.png</property>
<property name="offIconPath">images/light_off.png</property>
<implementation.java class="org.ow2.frascati.demo.common.homeautomation.light.LightMock" />
<service name="onoffdim-actuator">
<interface.java interface="org.ow2.frascati.demo.common.homeautomation.actuator.OnOffDimActuator" />
</service>
<implementation.java class="org.ow2.frascati.demo.common.homeautomation.light.LightMock" />
<service name="onoffdim-actuator-gui">
<interface.java interface="org.ow2.frascati.demo.common.onoffdevice.IOnOffDevice" />
</service>
</component>
<service name="onoffdim-actuator" promote="light-mock/onoffdim-actuator">
<binding.ws uri="http://localhost:9123/light/mock"/>
</service>
<service name="onoffdim-actuator-gui" promote="light-mock/onoffdim-actuator-gui">
<binding.ws uri="http://localhost:9123/light/mock/gui" />
</service>
</composite>
\ No newline at end of file
......@@ -33,14 +33,19 @@
<property name="offIconPath">images/switch_off.png</property>
<service name="onoff-actuator">
<interface.java
interface="org.ow2.frascati.demo.common.homeautomation.actuator.OnOffActuator" />
<interface.java interface="org.ow2.frascati.demo.common.homeautomation.actuator.OnOffActuator" />
</service>
<service name="onoff-actuator-gui">
<interface.java interface="org.ow2.frascati.demo.common.onoffdevice.IOnOffDevice" />
</service>
<implementation.java class="org.ow2.frascati.demo.common.homeautomation.SwitchMock" />
</component>
<service name="onoff-actuator" promote="switch-mock/onoff-actuator">
<binding.ws uri="http://localhost:9103/switch/mock" />
</service>
<service name="onoff-actuator-gui" promote="switch-mock/onoff-actuator-gui">
<binding.ws uri="http://localhost:9103/switch/mock/gui" />
</service>
</composite>
\ No newline at end of file
/**
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2012 Inria, University of Lille
*
* 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.demo.common.videoscreen.mock;
import org.junit.Test;
import org.ow2.frascati.demo.common.homeautomation.actuator.OnOffDimActuator;
import org.ow2.frascati.examples.test.FraSCAtiTestCase;
/**
*
*/
public class VideoScreenMockTest extends FraSCAtiTestCase
{
/* (non-Javadoc)
* @see org.ow2.frascati.examples.test.FraSCAtiTestCase#getComposite()
*/
@Override
public String getComposite()
{
return "videoscreen-mock";
}
@Test
public final void testInvoke() throws InterruptedException
{
OnOffDimActuator videoscreenMock=getService(OnOffDimActuator.class, "onoffdim-actuator");
videoscreenMock.acturatorOn();
videoscreenMock.actuatorDim(50);
videoscreenMock.acturatorOff();
}
}
Supports Markdown
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