View Javadoc
1   package org.codehaus.plexus.archiver.util;
2   
3   import java.io.File;
4   import junit.framework.TestCase;
5   import static org.codehaus.plexus.archiver.util.DefaultFileSet.fileSet;
6   
7   /**
8    * @author Kristian Rosenvold
9    */
10  public class DefaultFileSetTest
11      extends TestCase
12  {
13  
14      public void testCreate()
15      {
16          final String[] includes =
17          {
18              "zz", "yy"
19          };
20          final String[] exc =
21          {
22              "xx1", "xx2"
23          };
24          final DefaultFileSet dfs = fileSet( new File( "foo" ) ).prefixed( "pfx" ).include( includes ).exclude( exc );
25          assertEquals( "foo", dfs.getDirectory().getName() );
26          assertEquals( "pfx", dfs.getPrefix() );
27          assertEquals( "zz", dfs.getIncludes()[0] );
28          assertEquals( "xx1", dfs.getExcludes()[0] );
29      }
30  
31  }