Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
public static Integer addition(Integer nbre1,Integer nbre2) {
Integer result = 0;
return result;
}
public static Integer addition(Integer nbre1,Integer nbre2) {
Integer result = 0;
result = nbre1 + nbre2;
return result;
}
hi,
you can use Eclipse to driven test and construct your routine.
Export in jar format , add jar to Talend lib or load jar file with Talend component and Test with différent user cases.
Or in Talend, create the routine and use somme assertion for each user case.
First test failed, because nothing has been developped.public static Integer addition(Integer nbre1,Integer nbre2) {
Integer result = 0;
return result;
}
In my first user Case , I've fixed 2 values of integer to add at 10.
in tAssert i'm wating for ... 20
Run first failed (see result with tAssertCatcher).
Than begin to code your routine.public static Integer addition(Integer nbre1,Integer nbre2) {
Integer result = 0;
result = nbre1 + nbre2;
return result;
}
Run test again
Assert Catcher tell is Ok now.
Test with if a String is passed to your routines, or null values , or ..... etc
Hope it helps
regards
laurent
in my example (in TOS), you're coding your routines directly in Talend, but separatly from the use of that routine
in your ETL process (in a tMap for ex).
By this way, you're testing each new user case and result is directly safe in the routine you're using in your process.
regards
laurent
very simple
use tLibraryLoad
regards
laurent