/*
* This file is part of the WfMOpen project.
* Copyright (C) 2001-2004 Danet GmbH (www.danet.de), GS-AN.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: JellyLdapTest.java 1607 2006-09-29 12:32:13Z drmlipp $
*
* $Log$
* Revision 1.2 2005/09/05 09:41:49 drmlipp
* Synchronized with 1.3.2.
*
* Revision 1.1.2.4 2005/09/01 15:04:45 drmlipp
* Delete tag workfing.
*
* Revision 1.1.2.3 2005/09/01 11:37:21 drmlipp
* Insert Tag workfing.
*
* Revision 1.1.2.2 2005/08/30 14:37:43 drmlipp
* LDAP query workging.
*
* Revision 1.1.2.1 2005/08/29 15:21:44 drmlipp
* Started Jelly LDAP taglib.
*
* Revision 1.1.1.1 2004/08/18 15:18:47 drmlipp
* Update to 1.2
*
* Revision 1.2 2004/06/28 14:58:33 lipp
* Got test running.
*
* Revision 1.1 2004/06/23 15:07:35 lipp
* Jelly evaluation.
*
*/
package util;
import java.io.File;
import org.apache.commons.jelly.JellyContext;
import org.apache.commons.jelly.JellyException;
import org.apache.commons.jelly.XMLOutput;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* This class provides ...
*
* @author <a href="mailto:lipp@danet.de"></a>
* @version $Revision: 1607 $
*/
/**
* Test class for sax utility classes
*/
public class JellyLdapTest extends TestCase {
/**
* Konstruktor zum Erzeugen eines TestCase
*/
public JellyLdapTest (String name) {
super (name);
}
/**
* Assembling the test suite
*/
public static Test suite() throws Exception {
TestSuite suite = new TestSuite();
suite.addTest(new JellyLdapTest("connect"));
suite.addTest(new JellyLdapTest("query"));
suite.addTest(new JellyLdapTest("insert"));
suite.addTest(new JellyLdapTest("update"));
suite.addTest(new JellyLdapTest("delete"));
return suite;
}
/**
* Simple connection
*/
public void connect() throws Exception {
JellyContext context = new JellyContext();
XMLOutput xmlOutput = XMLOutput.createXMLOutput(System.out);
context.runScript(new File ("util/ldap-connect.jelly"), xmlOutput);
xmlOutput.flush();
}
/**
* Simple query
*/
public void query() throws Exception {
JellyContext context = new JellyContext();
XMLOutput xmlOutput = XMLOutput.createXMLOutput(System.out);
context.runScript(new File ("util/ldap-query.jelly"), xmlOutput);
xmlOutput.flush();
}
/**
* Simple insert
*/
public void insert() throws Exception {
JellyContext context = new JellyContext();
XMLOutput xmlOutput = XMLOutput.createXMLOutput(System.out);
context.runScript(new File ("util/ldap-insert.jelly"), xmlOutput);
xmlOutput.flush();
}
/**
* Simple update
*/
public void update() throws Exception {
JellyContext context = new JellyContext();
XMLOutput xmlOutput = XMLOutput.createXMLOutput(System.out);
context.runScript(new File ("util/ldap-update.jelly"), xmlOutput);
xmlOutput.flush();
}
/**
* Simple delete
*/
public void delete() throws Exception {
JellyContext context = new JellyContext();
XMLOutput xmlOutput = XMLOutput.createXMLOutput(System.out);
context.runScript(new File ("util/ldap-delete.jelly"), xmlOutput);
xmlOutput.flush();
}
}