KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > archie > impl > AttributeNamePartTest


1 package org.sapia.archie.impl;
2
3 import junit.framework.TestCase;
4
5 /**
6  * @author Yanick Duchesne
7  * <dl>
8  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
9  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
10  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
11  * </dl>
12  */

13 public class AttributeNamePartTest extends TestCase{
14   
15   public void testMatches() throws Exception JavaDoc{
16     AttributeNameParser p = new AttributeNameParser();
17     AttributeNamePart query = (AttributeNamePart)p.parseNamePart("name?attr1=value1");
18     AttributeNamePart item1 = (AttributeNamePart)p.parseNamePart("name?attr1=value1&attr2=value2");
19     super.assertTrue(item1.matches(query));
20     super.assertTrue(item1.matches(item1));
21     super.assertTrue(!query.matches(item1));
22   }
23   
24   public void testEquals() throws Exception JavaDoc{
25     
26   }
27 }
28
Popular Tags