Comments on: Unit testing Javascripts in Java 6 – Getting started with the javax.script api http://technology.amis.nl/2007/04/19/unit-testing-javascripts-in-java-6-getting-started-with-the-javaxscript-api/ Friends of Oracle and Java Fri, 19 Dec 2014 15:08:31 +0000 hourly 1 http://wordpress.org/?v=4.0.1 By: Screened Twenty http://technology.amis.nl/2007/04/19/unit-testing-javascripts-in-java-6-getting-started-with-the-javaxscript-api/#comment-4550 Tue, 05 Jun 2007 03:24:56 +0000 http://technology.amis.nl/blog/?p=1869#comment-4550 Hey.

Have a site with an article that deals with Unit Testing. The site itself contains loads of information when it comes to building large scale java applications, has common configuration tips too.

http://www.coderslog.com/Unit_Testing_101

]]>
By: Jeroen van Wilgenburg http://technology.amis.nl/2007/04/19/unit-testing-javascripts-in-java-6-getting-started-with-the-javaxscript-api/#comment-4549 Sat, 21 Apr 2007 20:37:27 +0000 http://technology.amis.nl/blog/?p=1869#comment-4549 That’s a good point, I still have to get used to the Javascript inside Java, it’s stil scary ;-)
Theoretically the array of int’s can contain Strings in the Javascript.

]]>
By: p3t0r http://technology.amis.nl/2007/04/19/unit-testing-javascripts-in-java-6-getting-started-with-the-javaxscript-api/#comment-4548 Thu, 19 Apr 2007 23:10:13 +0000 http://technology.amis.nl/blog/?p=1869#comment-4548 Next time I’ll execute a script before posting… the a1 and a2 inside the push method should be switched to get the same result as the example above.

]]>
By: p3t0r http://technology.amis.nl/2007/04/19/unit-testing-javascripts-in-java-6-getting-started-with-the-javaxscript-api/#comment-4547 Thu, 19 Apr 2007 22:57:59 +0000 http://technology.amis.nl/blog/?p=1869#comment-4547 oops….. it appears formatting it not allowed here ;)

]]>
By: p3t0r http://technology.amis.nl/2007/04/19/unit-testing-javascripts-in-java-6-getting-started-with-the-javaxscript-api/#comment-4546 Thu, 19 Apr 2007 22:56:06 +0000 http://technology.amis.nl/blog/?p=1869#comment-4546 I know it’s totally not the point, but if you’d written the method without magic numbers… and using javascripts build-in functions for imploding arrays it would have been far less error prone:

var a1 = [0,10,10,0]
var a2 = [‘days’,’hours’,’minutes’,’seconds’]

var t = [];
for( i in a1 ) {
if(a1[i] > 0){
t.push([a1[i] + ‘: ‘+ a2[i]]);
}
}

t.join(‘, ‘);

]]>