Package org.jostraca

Examples of org.jostraca.BasicTemplatePath.resolve()


      fail();
    } catch( IllegalArgumentException e ) {}

    try {
      btp.setTemplateName( "nonexistent-file.txt" );
      btp.resolve( new String[] {} );
      fail();
    } catch( TemplateException tpe ) {
      assertEquals( StandardException.Code.CAT_user, tpe.getCat() );
    }
View Full Code Here


      assertEquals( StandardException.Code.CAT_user, tpe.getCat() );
    }

    try {
      btp.setTemplateName( "/tmp" );
      btp.resolve( new String[] {} );
      fail();
    } catch( TemplateException tpe ) {
      assertEquals( StandardException.Code.CAT_user, tpe.getCat() );
    }
View Full Code Here

      assertEquals( StandardException.Code.CAT_user, tpe.getCat() );
    }

    try {
      btp.setTemplateName( "file.txt" );
      btp.resolve( new String[] {} );
      assertTrue( "file.txt".equals( btp.getTemplateName() ) );
      assertTrue( "file.txt".equals( btp.getTemplateFileName() ) );
      btp.resolve( new String[] {} );
    } catch( TemplateException tpe ) {
      fail();
View Full Code Here

    try {
      btp.setTemplateName( "file.txt" );
      btp.resolve( new String[] {} );
      assertTrue( "file.txt".equals( btp.getTemplateName() ) );
      assertTrue( "file.txt".equals( btp.getTemplateFileName() ) );
      btp.resolve( new String[] {} );
    } catch( TemplateException tpe ) {
      fail();
    }

  }
View Full Code Here

    } catch( IllegalArgumentException e ) {}


    try {
      btp.setTemplateNameFromFile( "nonexistent-file.txt", "nonexistant-folder/filelist.txt"  );
      btp.resolve( new String[] {} );
      fail();
    } catch( TemplateException tpe ) {
      assertEquals( StandardException.Code.CAT_user, tpe.getCat() );
    }
View Full Code Here

    }

    // REVIEW: file.txt is found because it exists in the current folder - is this good?
    try {
      btp.setTemplateNameFromFile( "file.txt", "nonexistent-folder/filelist.txt"  );
      btp.resolve( new String[] {} );
    } catch( TemplateException tpe ) {
      fail();
    }
    try {
      btp.setTemplateNameFromFile( "some-file.txt", "nonexistent-folder/filelist.txt"  );
View Full Code Here

    } catch( TemplateException tpe ) {
      fail();
    }
    try {
      btp.setTemplateNameFromFile( "some-file.txt", "nonexistent-folder/filelist.txt"  );
      btp.resolve( new String[] {} );
      fail();
    } catch( TemplateException tpe ) {
      assertEquals( StandardException.Code.CAT_user, tpe.getCat() );
    }
View Full Code Here

    }


    try {
      btp.setTemplateNameFromFile( "nonexistent-file.txt", "folder/filelist.txt" );
      btp.resolve( new String[] {} );
      fail();
    } catch( TemplateException tpe ) {
      assertEquals( StandardException.Code.CAT_user, tpe.getCat() );
    }
View Full Code Here

      assertEquals( StandardException.Code.CAT_user, tpe.getCat() );
    }

    try {
      btp.setTemplateNameFromFile( "file.txt", "folder/filelist.txt" );
      btp.resolve( new String[] {} );
      assertTrue( ("folder"+File.separator+"file.txt").equals( btp.getTemplatePath() ) );
    }
    catch( TemplateException tpe ) {
      fail();
    }
View Full Code Here

    }

    try {
      File tmpFile = File.createTempFile( "jostraca", "test" );
      btp.setTemplateNameFromFile( tmpFile.getAbsolutePath(), "folder/filelist.txt" );
      btp.resolve( new String[] {} );
      assertTrue( tmpFile.getAbsolutePath().equals( btp.getTemplatePath() ) );
    }
    catch( TemplateException tpe ) {
      fail();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.