KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > store > SegmentedProductPathFinderTest


1 package com.openedit.store;
2
3 import junit.framework.TestCase;
4
5 public class SegmentedProductPathFinderTest extends TestCase
6 {
7     protected SegmentedProductPathFinder fPathFinder;
8     
9     protected void setUp()
10     {
11         fPathFinder = new SegmentedProductPathFinder();
12         fPathFinder.setSegmentLength( 3 );
13         //fPathFinder.setMaxSegments( 2 );
14
}
15     
16     public void testIdToPath()
17     {
18         assertEquals( "abc/abcde", fPathFinder.idToPath( "abcde" ) );
19     }
20     
21
22     public void testReverseIdToPath()
23     {
24         //fPathFinder.setMaxSegments( 0 );
25
fPathFinder.setReverse(true);
26         
27         assertEquals( "hij/abcdefghij", fPathFinder.idToPath( "abcdefghij" ) );
28     }
29
30 }
31
Popular Tags