If I have a template like this:
/**
* This is test code
*
* Copyright (C) $cy. McNeill Communications, LLC.
*
* @author $dev
* @version $date
*/
package ${tdir 5 ${d ${tdir 1 $filename}}};
import dev.thistest.core.*;
public class ${text ${basename $filename}} extends TestSet
{
@TestCase
public void testCtor()
{
${subst Test '' ${text ${basename $filename}}} ${dc
${subst Test '' ${text ${basename $filename}}}}=new ${subst Test ''
${text ${basename $filename}}}();
assertTrue(${dc ${subst Test '' ${text ${basename
$filename}}}}!=null);
}
}
it would sure be a lot more easy to read if I can create new aesub
expansions for example:
${assign className ${text ${basename $filename}}
**
* This is test code
*
* Copyright (C) $cy. McNeill Communications, LLC.
*
* @author $dev
* @version $date
*/
package ${tdir 5 ${d ${tdir 1 $filename}}};
import dev.thistest.core.*;
public class $className extends TestSet
{
@TestCase
public void testCtor()
{
$className ${dc $className}=new ${className}();
assertTrue(${dc $className}!=null);
}
}
Even though the above are not quite right (it doesn't know how to
convert dir separtors into the dot'ed notation that Java wants [but that
is trivial]) both would produce something like this:
/**
* This is test code
*
* Copyright (C) 2009. McNeill Communications, LLC.
*
* @author aryeh
* @version Sun Jul 5 17:52:03 2009
*/
package test;
import dev.thistest.core.*;
public class TestMyClass extends TestSet
{
@TestCase
public void testCtor()
{
MyClass myclass=new MyClassl();
assertTrue(myclass!=null);
}
}
How hard is this to aedd to aesub(5)? Oh an other thing would be a
macro to convert to "camel" notation i.e. thisIsACamel or ThisIsACamel
(user should be allowed to say which one to use with the first being
default?)
_______________________________________________
Aegis-users mailing list
Aegis-users@...
http://www.auug.org.au/mailman/listinfo/aegis-users