[jbehave-user] Passing null integer from story file to step class

2013-12-18 Thread Mary Walshe
Hi All,

I'm trying to pass a null integer into my step from my story file and I
can't seem to do this.

I know I can send it in as a string and just convert it but it would be
nice to be able to pass in null.

Has anyone come across this before?

Cheers,
Mary


Re: [jbehave-user] Passing null integer from story file to step class

2013-12-18 Thread Andreas Ebbert-Karroum
Just to make sure, your parameter in the step method has Integer as
parameter type, not int?`

If true, you probably have to write your own ParameterConverter.

http://jbehave.org/reference/stable/parameter-converters.html

Andreas


2013/12/18 Mary Walshe 

> Hi All,
>
> I'm trying to pass a null integer into my step from my story file and I
> can't seem to do this.
>
> I know I can send it in as a string and just convert it but it would be
> nice to be able to pass in null.
>
> Has anyone come across this before?
>
> Cheers,
> Mary
>
>


-- 
Mit freundlichen Grüßen / Best regards

Andreas Ebbert-Karroum | Agile Principal Consultant

codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
tel: +49 (0) 212.23362825 | fax: +49 (0) 212.23362879 | mobil: +49 (0)
175.2664109
www.codecentric.de | blog.codecentric.de | www.meettheexperts.de |
www.more4fi.de

Sitz der Gesellschaft: Düsseldorf | HRB 63043
Vorstand: Klaus Jäger (Vorsitzender) . Michael Hochgürtel . Mirko Novakovic
. Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Bernd Klinkmann . Jürgen
Schütz

Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche
und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige
Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie
bitte sofort den Absender und löschen Sie diese E-Mail und evtl.
beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen
evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist
nicht gestattet.


Re: [jbehave-user] Passing null integer from story file to step class

2013-12-18 Thread louis gueye
Hi Mary,

I think this is not possible possible as the parser won't be able to see
the difference between a null and an empty String.
It could be supported by supporting some convention on the default Parser
like "Whenever you meet the  token then convert it to null required
type (null String, Date, Integer, Long, etc)"

It's not native, and I think I don't really see the benefit.
For the time being I think you should write your own ParameterConverter and
use it in the concerned stories.

Cheers,
Louis.

Cordialement/Regards,

Louis GUEYE
linkedin  |
blog|
twitter 


2013/12/18 Mary Walshe 

> Hi All,
>
> I'm trying to pass a null integer into my step from my story file and I
> can't seem to do this.
>
> I know I can send it in as a string and just convert it but it would be
> nice to be able to pass in null.
>
> Has anyone come across this before?
>
> Cheers,
> Mary
>
>