public class AllowedGVTest extends AbstractTest {
@Test
public void test() throws Exception {
String data = getFile("bpd/bpd-allowedgv.txt");
HBCIKernelImpl kernel = new HBCIKernelImpl(null,"plus");
Rewrite.setData("msgName","Synch");
// liste der rewriter erzeugen
String rewriters_st=HBCIUtils.getParam("kernel.rewriter");
ArrayList<Rewrite> al=new ArrayList<Rewrite>();
StringTokenizer tok=new StringTokenizer(rewriters_st,",");
while (tok.hasMoreTokens()) {
String rewriterName=tok.nextToken().trim();
if (rewriterName.length()!=0) {
Class cl=this.getClass().getClassLoader().loadClass("org.kapott.hbci.rewrite.R"+
rewriterName);
Constructor con=cl.getConstructor((Class[])null);
Rewrite rewriter=(Rewrite)(con.newInstance((Object[])null));
al.add(rewriter);
}
}
Rewrite[] rewriters= al.toArray(new Rewrite[al.size()]);
kernel.rawNewMsg("Synch");
MsgGen gen = kernel.getMsgGen();
// alle patches f�r die unverschl�sselte nachricht durchlaufen
String newmsgstring = data;
for (int i=0;i<rewriters.length;i++) {
newmsgstring=rewriters[i].incomingClearText(newmsgstring,gen);