Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
frascati
frascati
Commits
c92dd3f2
Commit
c92dd3f2
authored
Jul 26, 2012
by
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
demo/common/common-homeautomation/common-homeautomation-light-mock/src/main/resources/light-mock.composite
View file @
c92dd3f2
...
...
@@ -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
demo/common/common-homeautomation/common-homeautomation-switch-mock/src/main/resources/switch-mock.composite
View file @
c92dd3f2
...
...
@@ -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
demo/common/common-homeautomation/common-homeautomation-videoscreen-mock/src/test/java/org/ow2/frascati/demo/common/videoscreen/mock/VideoScreenMockTest.java
0 → 100644
View file @
c92dd3f2
/**
* 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
();
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment