1   /*
2   wsmo4j - a WSMO API and Reference Implementation
3   
4   Copyright (c) 2005, University of Innsbruck, Austria
5   
6   This library is free software; you can redistribute it and/or modify it under
7   the terms of the GNU Lesser General Public License as published by the Free
8   Software Foundation; either version 2.1 of the License, or (at your option)
9   any later version.
10  This library is distributed in the hope that it will be useful, but WITHOUT
11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13  details.
14  You should have received a copy of the GNU Lesser General Public License along
15  with this library; if not, write to the Free Software Foundation, Inc.,
16  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */
18  package test.wsmo4j.validator;
19  
20  import java.io.InputStream;
21  import java.io.InputStreamReader;
22  import java.util.List;
23  import java.util.Vector;
24  
25  import org.deri.wsmo4j.validator.WsmlValidatorImpl;
26  import org.omwg.logicalexpression.LogicalExpression;
27  import org.omwg.ontology.Ontology;
28  import org.wsmo.validator.ValidationError;
29  import org.wsmo.validator.ValidationWarning;
30  import org.wsmo.validator.WsmlValidator;
31  
32  /**
33   * This unit test class is meant to show up bugs in the 
34   * validator that need to be fixed.
35   * 
36   * <pre>
37   * Created on Sep 19, 2006
38   * Committed by $Author: morcen $
39   * $Source$,
40   * </pre>
41   * 
42   * @author holger.lausen@deri.org
43   * @version $Revision: 1946 $ $Date: 2007-04-02 15:13:28 +0300 (Mon, 02 Apr 2007) $
44   */
45  public class CarlosValidatorTests extends ValidatorTestCase {
46  
47  	LogicalExpression logExpr = null;
48  	
49  	List <ValidationError> errors = new Vector <ValidationError>();
50  	
51  	List <ValidationWarning> warnings = new Vector <ValidationWarning> ();
52  	
53  	WsmlValidator validator = new WsmlValidatorImpl();
54  	
55  	public void testCarlos() throws Exception{
56          InputStream in = getClass().getClassLoader().getResourceAsStream(
57                  "test/wsmo4j/validator/Carlos.wsml");
58          Ontology o = (Ontology) parser.parse(new InputStreamReader(in))[0];
59          validator.isValid(o, errors, warnings);
60          assertEquals(0, errors.size());
61          assertEquals(0, warnings.size());
62          
63      }
64  }
65  /*
66   * $Log$
67   * Revision 1.2  2007/04/02 12:13:23  morcen
68   * Generics support added to wsmo-api, wsmo4j and wsmo-test
69   *
70   * Revision 1.1  2007/03/19 20:53:15  holgerlausen
71   * Bug 1683538 can not reproduce
72   * 
73   */