[MOBY-dev] creating primary inputs from scratch

Edward Kawas edward.kawas at gmail.com
Fri Feb 20 12:55:06 UTC 2009


Hi Michael,

If you are interested in writing unit tests for your services, have you had
a chance to look at the following page?
http://biomoby.open-bio.org/index.php/for-developers/moby_extensions/unit-te
sts-for-moby-services

There you will find how to write test cases for your services (using
dashboard) and then how to test the services once your test cases have been
written.

Let me know if you need any more information!

Eddie

-----Original Message-----

On Fri, 20 Feb 2009 02:35:25 -0800, Michael Gerlich  
<mgerlich at ipb-halle.de> wrote:

> Hi all,
>
> I want to create a simple JUnit test case that tests if all services  
> we're offering (in both default and testing registry) are working. I'am  
> stuck in creating primary inputs for datatypes other than Object,  
> especially ArrayString, ArrayFloat and MSPeakRelList - all defined in  
> both registries.
>
> I modified this example
>
http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/SimpleClient.htm
l#helloWorld
>
> An MSPeakRelList is a list/array of MSPeakRel members. MSPeakRel has two  
> children mz and relInt, defining a peak.
>
> Here is what I do in order to create such a datatype as input for a  
> service:
>
> MSPeakRelList msList = new MSPeakRelList();
>        MSPeakRel ms1 = new MSPeakRel();
> ms1.set_mz(153.3);
> ms1.set_relInt(316);
>       MSPeakRel ms2 = new MSPeakRel();
> ms2.set_mz(273.069);
> ms2.set_relInt(999);
>     MSPeakRel[] peaks = new MSPeakRel[2];
> for (int i = 0; i < peaks.length; i++) {
>       peaks[i] = new MSPeakRel();
> }
> peaks[0] = ms1;
> peaks[1] = ms2;
> msList.set_MSPeakRel(peaks);
>
>
> The simple client uses the MobyRequest function setInput(). It's  
> arguments are either of type MobyContentInstance or MobyDataInstance.
> Now what am I supposed to do to correctly set msList as primary input to  
> a service (MassBank_QSearch_Test, testing reg).
>
> BTW, it has gotten quiet on the mailing lists...
>
>
> Kind regards,
>
> Michael
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-dev
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
_______________________________________________
MOBY-dev mailing list
MOBY-dev at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/moby-dev




More information about the MOBY-dev mailing list