How to implement a Tmar test in Jspresso? -


following www.tmar-test.com installation procedure, wrote basic test (arithmetic sum) in jspresso application , ok.

in second step, write more realistic test , call method part of jspresso application.

i need initiate test description context in order call method, lack of information.

do have snippet me ?

as example, based on hrsample, provide tmar method calling computeage method ?

below computeage method :

package org.jspresso.hrsample.model.service; import java.util.date; import org.jspresso.hrsample.model.employee; import org.jspresso.framework.model.component.service.icomponentservice; /** * services delegate of employee entity */ public class employeeservicedelegate implements icomponentservice { /** * computes employee age. * * @param employee * employee service execution has been triggered on. * @param birthdate * birth date (might different actual employee birth * date). * @return age computed birth date passed parameter. */ public integer computeage(employee employee, date birthdate) { if (birthdate != null) { return new integer( (int) ((new date().gettime() - birthdate.gettime()) / (1000l * 60 * 60 * 24 * 365))); } return null; } } 

look this post @ jspresso.org should you.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -