Ivan Yatskevich (JIRA | 12 Jan 11:22 2011

[jira] Commented: (JMOCK-247) Scripted action absent?


    [
http://jira.codehaus.org/browse/JMOCK-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251295#action_251295
] 

Ivan Yatskevich commented on JMOCK-247:
---------------------------------------

Hi Shay,

> First, you need to add the following JARs to your classpath:
>
>    * jmock-script-2.5.1.jar
>    * bsh-core-2.0b4.jar

> Scripted action absent? 
> ------------------------
>
>                 Key: JMOCK-247
>                 URL: http://jira.codehaus.org/browse/JMOCK-247
>             Project: jMock
>          Issue Type: Bug
>          Components: Website
>    Affects Versions: 2.5.1
>            Reporter: Shay Rojansky
>            Priority: Trivial
>
> The webpage on scripting (http://www.jmock.org/scripting.html) says you should do:
> import static org.jmock.lib.script.ScriptedCallbackAction.perform;
> This should be:
(Continue reading)

ole | 12 Jan 13:52 2011
Picon

Re: [jira] Commented: (JMOCK-247) Scripted action absent?

Ivan Yatskevich (JIRA <jira <at> ...> writes:

> 
> 
>     [
> http://jira.codehaus.org/browse/JMOCK-247?
page=com.atlassian.jira.plugin.system.issuetabpanels:comment-
tabpanel&focusedCommentId=251295#action_251295
> ] 
> 
> Ivan Yatskevich commented on JMOCK-247:
> ---------------------------------------
> 
> Hi Shay,
> 
> > First, you need to add the following JARs to your classpath:
> >
> >    * jmock-script-2.5.1.jar
> >    * bsh-core-2.0b4.jar

Thanks :)
That solved it. Now I can...
> > import static org.jmock.lib.script.ScriptedAction.perform;
..and use...
will(perform("[myscript]"));

...However after playing around a bit,(and because I'm not very experienced 
with BeanShell scripting), I found that for my needs there was a better 
solution using the abstract class org.jmock.lib.action.CustomAction:
I wanted to test a component running in a thread launched by the test.
(Continue reading)


Gmane