target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testAddEntry() throws IOException { CompressionProvider provider = outStream.getCompressionProvider(); ByteArrayOutputStream out = new ByteArrayOutputStream(); outStream = new DummyCompressionOS( out, provider ); outStream.addEntry( null, null ); } | public void addEntry( String filename, String extension ) throws IOException { } | CompressionOutputStream extends OutputStream { public void addEntry( String filename, String extension ) throws IOException { } } | CompressionOutputStream extends OutputStream { public void addEntry( String filename, String extension ) throws IOException { } CompressionOutputStream( OutputStream out, CompressionProvider provider ); private CompressionOutputStream(); } | CompressionOutputStream extends OutputStream { public void addEntry( String filename, String extension ) throws IOException { } CompressionOutputStream( OutputStream out, CompressionProvider provider ); private CompressionOutputStream(); CompressionProvider getCompressionProvider(); void addEntry( String filename, Str... | CompressionOutputStream extends OutputStream { public void addEntry( String filename, String extension ) throws IOException { } CompressionOutputStream( OutputStream out, CompressionProvider provider ); private CompressionOutputStream(); CompressionProvider getCompressionProvider(); void addEntry( String filename, Str... |
@Test public void testGetInstance() { assertNotNull( factory ); } | public static CompressionProviderFactory getInstance() { return INSTANCE; } | CompressionProviderFactory implements CompressionProviderFactoryInterface { public static CompressionProviderFactory getInstance() { return INSTANCE; } } | CompressionProviderFactory implements CompressionProviderFactoryInterface { public static CompressionProviderFactory getInstance() { return INSTANCE; } private CompressionProviderFactory(); } | CompressionProviderFactory implements CompressionProviderFactoryInterface { public static CompressionProviderFactory getInstance() { return INSTANCE; } private CompressionProviderFactory(); static CompressionProviderFactory getInstance(); @Override CompressionProvider createCompressionProviderInstance( String name ); ... | CompressionProviderFactory implements CompressionProviderFactoryInterface { public static CompressionProviderFactory getInstance() { return INSTANCE; } private CompressionProviderFactory(); static CompressionProviderFactory getInstance(); @Override CompressionProvider createCompressionProviderInstance( String name ); ... |
@Test public void testCreateCoreProviders() { CompressionProvider provider = factory.createCompressionProviderInstance( "None" ); assertNotNull( provider ); assertTrue( provider.getClass().isAssignableFrom( NoneCompressionProvider.class ) ); assertEquals( "None", provider.getName() ); assertEquals( "No compression", pr... | @Override public CompressionProvider createCompressionProviderInstance( String name ) { CompressionProvider provider = null; List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) { if ( name != null && name.equalsIgnoreCase( plugin.getName() ) ) { try { re... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public CompressionProvider createCompressionProviderInstance( String name ) { CompressionProvider provider = null; List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) {... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public CompressionProvider createCompressionProviderInstance( String name ) { CompressionProvider provider = null; List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) {... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public CompressionProvider createCompressionProviderInstance( String name ) { CompressionProvider provider = null; List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) {... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public CompressionProvider createCompressionProviderInstance( String name ) { CompressionProvider provider = null; List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) {... |
@Test public void getCoreProviderNames() { @SuppressWarnings( "serial" ) final HashMap<String, Boolean> foundProvider = new HashMap<String, Boolean>() { { put( "None", false ); put( "Zip", false ); put( "GZip", false ); put( "Snappy", false ); put( "Hadoop-snappy", false ); } }; String[] providers = factory.getCompress... | @Override public String[] getCompressionProviderNames() { ArrayList<String> providerNames = new ArrayList<String>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) { try { CompressionProvider provider = PluginRegistry.getInstance().loadClass( plugin... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public String[] getCompressionProviderNames() { ArrayList<String> providerNames = new ArrayList<String>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) { try { C... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public String[] getCompressionProviderNames() { ArrayList<String> providerNames = new ArrayList<String>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) { try { C... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public String[] getCompressionProviderNames() { ArrayList<String> providerNames = new ArrayList<String>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) { try { C... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public String[] getCompressionProviderNames() { ArrayList<String> providerNames = new ArrayList<String>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) { try { C... |
@Test public void getCoreProviders() { @SuppressWarnings( "serial" ) final HashMap<String, Boolean> foundProvider = new HashMap<String, Boolean>() { { put( "None", false ); put( "Zip", false ); put( "GZip", false ); put( "Snappy", false ); put( "Hadoop-snappy", false ); } }; Collection<CompressionProvider> providers = ... | @Override public Collection<CompressionProvider> getCompressionProviders() { Collection<CompressionProvider> providerClasses = new ArrayList<CompressionProvider>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) { try { providerClasses.add( PluginRe... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public Collection<CompressionProvider> getCompressionProviders() { Collection<CompressionProvider> providerClasses = new ArrayList<CompressionProvider>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public Collection<CompressionProvider> getCompressionProviders() { Collection<CompressionProvider> providerClasses = new ArrayList<CompressionProvider>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public Collection<CompressionProvider> getCompressionProviders() { Collection<CompressionProvider> providerClasses = new ArrayList<CompressionProvider>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ... | CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public Collection<CompressionProvider> getCompressionProviders() { Collection<CompressionProvider> providerClasses = new ArrayList<CompressionProvider>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ... |
@Test public void testService() throws Exception { when( req.getContextPath() ).thenReturn( "/Path" ); when( baseCartePlugin.getContextPath() ).thenReturn( "/Path" ); when( log.isDebug() ).thenReturn( true ); baseCartePlugin.service( req, resp ); verify( log ).logDebug( baseCartePlugin.getService() ); verify( baseCarte... | @Override protected void service( HttpServletRequest req, HttpServletResponse resp ) throws IOException { if ( isJettyMode() && !req.getContextPath().endsWith( getContextPath() ) ) { return; } if ( log.isDebug() ) { logDebug( getService() ); } handleRequest( new CarteRequestImpl( req, resp ) ); } | BaseCartePlugin extends BaseHttpServlet implements CartePluginInterface, CarteRequestHandler { @Override protected void service( HttpServletRequest req, HttpServletResponse resp ) throws IOException { if ( isJettyMode() && !req.getContextPath().endsWith( getContextPath() ) ) { return; } if ( log.isDebug() ) { logDebug(... | BaseCartePlugin extends BaseHttpServlet implements CartePluginInterface, CarteRequestHandler { @Override protected void service( HttpServletRequest req, HttpServletResponse resp ) throws IOException { if ( isJettyMode() && !req.getContextPath().endsWith( getContextPath() ) ) { return; } if ( log.isDebug() ) { logDebug(... | BaseCartePlugin extends BaseHttpServlet implements CartePluginInterface, CarteRequestHandler { @Override protected void service( HttpServletRequest req, HttpServletResponse resp ) throws IOException { if ( isJettyMode() && !req.getContextPath().endsWith( getContextPath() ) ) { return; } if ( log.isDebug() ) { logDebug(... | BaseCartePlugin extends BaseHttpServlet implements CartePluginInterface, CarteRequestHandler { @Override protected void service( HttpServletRequest req, HttpServletResponse resp ) throws IOException { if ( isJettyMode() && !req.getContextPath().endsWith( getContextPath() ) ) { return; } if ( log.isDebug() ) { logDebug(... |
@Test public void getCompressionProvider() { CompressionProvider provider = inStream.getCompressionProvider(); assertEquals( provider.getName(), PROVIDER_NAME ); } | public CompressionProvider getCompressionProvider() { return compressionProvider; } | CompressionInputStream extends InputStream { public CompressionProvider getCompressionProvider() { return compressionProvider; } } | CompressionInputStream extends InputStream { public CompressionProvider getCompressionProvider() { return compressionProvider; } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); } | CompressionInputStream extends InputStream { public CompressionProvider getCompressionProvider() { return compressionProvider; } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); CompressionProvider getCompressionProvider(); Object nextEntry(); @Override void clo... | CompressionInputStream extends InputStream { public CompressionProvider getCompressionProvider() { return compressionProvider; } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); CompressionProvider getCompressionProvider(); Object nextEntry(); @Override void clo... |
@Test public void testNextEntry() throws IOException { assertNull( inStream.nextEntry() ); } | public Object nextEntry() throws IOException { return null; } | CompressionInputStream extends InputStream { public Object nextEntry() throws IOException { return null; } } | CompressionInputStream extends InputStream { public Object nextEntry() throws IOException { return null; } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); } | CompressionInputStream extends InputStream { public Object nextEntry() throws IOException { return null; } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); CompressionProvider getCompressionProvider(); Object nextEntry(); @Override void close(); @Override int re... | CompressionInputStream extends InputStream { public Object nextEntry() throws IOException { return null; } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); CompressionProvider getCompressionProvider(); Object nextEntry(); @Override void close(); @Override int re... |
@Test public void testClose() throws IOException { CompressionProvider provider = inStream.getCompressionProvider(); ByteArrayInputStream in = createTestInputStream(); inStream = new DummyCompressionIS( in, provider ); inStream.close(); } | @Override public void close() throws IOException { delegate.close(); } | CompressionInputStream extends InputStream { @Override public void close() throws IOException { delegate.close(); } } | CompressionInputStream extends InputStream { @Override public void close() throws IOException { delegate.close(); } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); } | CompressionInputStream extends InputStream { @Override public void close() throws IOException { delegate.close(); } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); CompressionProvider getCompressionProvider(); Object nextEntry(); @Override void close(); @Overri... | CompressionInputStream extends InputStream { @Override public void close() throws IOException { delegate.close(); } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); CompressionProvider getCompressionProvider(); Object nextEntry(); @Override void close(); @Overri... |
@Test public void testRead() throws IOException { CompressionProvider provider = inStream.getCompressionProvider(); ByteArrayInputStream in = createTestInputStream(); inStream = new DummyCompressionIS( in, provider ); assertEquals( inStream.available(), inStream.read( new byte[ 100 ], 0, inStream.available() ) ); } | @Override public int read() throws IOException { return delegate.read(); } | CompressionInputStream extends InputStream { @Override public int read() throws IOException { return delegate.read(); } } | CompressionInputStream extends InputStream { @Override public int read() throws IOException { return delegate.read(); } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); } | CompressionInputStream extends InputStream { @Override public int read() throws IOException { return delegate.read(); } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); CompressionProvider getCompressionProvider(); Object nextEntry(); @Override void close(); @Ov... | CompressionInputStream extends InputStream { @Override public int read() throws IOException { return delegate.read(); } CompressionInputStream( InputStream in, CompressionProvider provider ); private CompressionInputStream(); CompressionProvider getCompressionProvider(); Object nextEntry(); @Override void close(); @Ov... |
@Test public void testGetName() { GZIPCompressionProvider provider = (GZIPCompressionProvider) factory.getCompressionProviderByName( PROVIDER_NAME ); assertNotNull( provider ); assertEquals( PROVIDER_NAME, provider.getName() ); } | @Override public String getName() { return "GZip"; } | GZIPCompressionProvider implements CompressionProvider { @Override public String getName() { return "GZip"; } } | GZIPCompressionProvider implements CompressionProvider { @Override public String getName() { return "GZip"; } } | GZIPCompressionProvider implements CompressionProvider { @Override public String getName() { return "GZip"; } @Override GZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput(); @Override GZIPCompressionOutputStream createOutputStream( OutputStream out ); @Override boolean supp... | GZIPCompressionProvider implements CompressionProvider { @Override public String getName() { return "GZip"; } @Override GZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput(); @Override GZIPCompressionOutputStream createOutputStream( OutputStream out ); @Override boolean supp... |
@Test public void testCreateInputStream() throws IOException { GZIPCompressionProvider provider = (GZIPCompressionProvider) factory.getCompressionProviderByName( PROVIDER_NAME ); ByteArrayOutputStream baos = new ByteArrayOutputStream(); GZIPOutputStream gos = new GZIPOutputStream( baos ); byte[] testBytes = "Test".getB... | @Override public GZIPCompressionInputStream createInputStream( InputStream in ) throws IOException { return new GZIPCompressionInputStream( in, this ); } | GZIPCompressionProvider implements CompressionProvider { @Override public GZIPCompressionInputStream createInputStream( InputStream in ) throws IOException { return new GZIPCompressionInputStream( in, this ); } } | GZIPCompressionProvider implements CompressionProvider { @Override public GZIPCompressionInputStream createInputStream( InputStream in ) throws IOException { return new GZIPCompressionInputStream( in, this ); } } | GZIPCompressionProvider implements CompressionProvider { @Override public GZIPCompressionInputStream createInputStream( InputStream in ) throws IOException { return new GZIPCompressionInputStream( in, this ); } @Override GZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput();... | GZIPCompressionProvider implements CompressionProvider { @Override public GZIPCompressionInputStream createInputStream( InputStream in ) throws IOException { return new GZIPCompressionInputStream( in, this ); } @Override GZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput();... |
@Test public void testCreateOutputStream() throws IOException { GZIPCompressionProvider provider = (GZIPCompressionProvider) factory.getCompressionProviderByName( PROVIDER_NAME ); ByteArrayOutputStream out = new ByteArrayOutputStream(); GZIPOutputStream gos = new GZIPOutputStream( out ); GZIPCompressionOutputStream out... | @Override public GZIPCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new GZIPCompressionOutputStream( out, this ); } | GZIPCompressionProvider implements CompressionProvider { @Override public GZIPCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new GZIPCompressionOutputStream( out, this ); } } | GZIPCompressionProvider implements CompressionProvider { @Override public GZIPCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new GZIPCompressionOutputStream( out, this ); } } | GZIPCompressionProvider implements CompressionProvider { @Override public GZIPCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new GZIPCompressionOutputStream( out, this ); } @Override GZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsIn... | GZIPCompressionProvider implements CompressionProvider { @Override public GZIPCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new GZIPCompressionOutputStream( out, this ); } @Override GZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsIn... |
@Test public void testClose() throws IOException { inStream = new GZIPCompressionInputStream( createGZIPInputStream(), provider ) { }; inStream.close(); } | @Override public void close() throws IOException { GZIPInputStream gis = (GZIPInputStream) delegate; gis.close(); } | GZIPCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { GZIPInputStream gis = (GZIPInputStream) delegate; gis.close(); } } | GZIPCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { GZIPInputStream gis = (GZIPInputStream) delegate; gis.close(); } GZIPCompressionInputStream( InputStream in, CompressionProvider provider ); } | GZIPCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { GZIPInputStream gis = (GZIPInputStream) delegate; gis.close(); } GZIPCompressionInputStream( InputStream in, CompressionProvider provider ); @Override void close(); @Override int read(); } | GZIPCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { GZIPInputStream gis = (GZIPInputStream) delegate; gis.close(); } GZIPCompressionInputStream( InputStream in, CompressionProvider provider ); @Override void close(); @Override int read(); } |
@Test public void testRead() throws IOException { inStream = new GZIPCompressionInputStream( createGZIPInputStream(), provider ) { }; inStream.read( new byte[100], 0, inStream.available() ); } | @Override public int read() throws IOException { GZIPInputStream gis = (GZIPInputStream) delegate; return gis.read(); } | GZIPCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { GZIPInputStream gis = (GZIPInputStream) delegate; return gis.read(); } } | GZIPCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { GZIPInputStream gis = (GZIPInputStream) delegate; return gis.read(); } GZIPCompressionInputStream( InputStream in, CompressionProvider provider ); } | GZIPCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { GZIPInputStream gis = (GZIPInputStream) delegate; return gis.read(); } GZIPCompressionInputStream( InputStream in, CompressionProvider provider ); @Override void close(); @Override int read(); } | GZIPCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { GZIPInputStream gis = (GZIPInputStream) delegate; return gis.read(); } GZIPCompressionInputStream( InputStream in, CompressionProvider provider ); @Override void close(); @Override int read(); } |
@Test public void testClose() throws IOException { CompressionProvider provider = outStream.getCompressionProvider(); ByteArrayOutputStream out = new ByteArrayOutputStream(); outStream = new GZIPCompressionOutputStream( out, provider ) { }; outStream.close(); try { outStream.write( "This will throw an Exception if the ... | @Override public void close() throws IOException { GZIPOutputStream zos = (GZIPOutputStream) delegate; zos.close(); } | GZIPCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { GZIPOutputStream zos = (GZIPOutputStream) delegate; zos.close(); } } | GZIPCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { GZIPOutputStream zos = (GZIPOutputStream) delegate; zos.close(); } GZIPCompressionOutputStream( OutputStream out, CompressionProvider provider ); } | GZIPCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { GZIPOutputStream zos = (GZIPOutputStream) delegate; zos.close(); } GZIPCompressionOutputStream( OutputStream out, CompressionProvider provider ); @Override void close(); } | GZIPCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { GZIPOutputStream zos = (GZIPOutputStream) delegate; zos.close(); } GZIPCompressionOutputStream( OutputStream out, CompressionProvider provider ); @Override void close(); } |
@Test public void testGetService() throws Exception { when( baseCartePlugin.getContextPath() ) .thenReturn( "/Path" ); assertThat( baseCartePlugin.getService().startsWith( "/Path" ), is( true ) ); } | public String getService() { return getContextPath() + " (" + toString() + ")"; } | BaseCartePlugin extends BaseHttpServlet implements CartePluginInterface, CarteRequestHandler { public String getService() { return getContextPath() + " (" + toString() + ")"; } } | BaseCartePlugin extends BaseHttpServlet implements CartePluginInterface, CarteRequestHandler { public String getService() { return getContextPath() + " (" + toString() + ")"; } } | BaseCartePlugin extends BaseHttpServlet implements CartePluginInterface, CarteRequestHandler { public String getService() { return getContextPath() + " (" + toString() + ")"; } @Deprecated @Override void doGet( HttpServletRequest req, final HttpServletResponse resp ); @Override abstract void handleRequest( CarteReques... | BaseCartePlugin extends BaseHttpServlet implements CartePluginInterface, CarteRequestHandler { public String getService() { return getContextPath() + " (" + toString() + ")"; } @Deprecated @Override void doGet( HttpServletRequest req, final HttpServletResponse resp ); @Override abstract void handleRequest( CarteReques... |
@Test public void testNextEntry() throws IOException { assertNotNull( createZIPInputStream().getNextEntry() ); } | @Override public Object nextEntry() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } return zis.getNextEntry(); } | ZIPCompressionInputStream extends CompressionInputStream { @Override public Object nextEntry() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } return zis.getNextEntry(); } } | ZIPCompressionInputStream extends CompressionInputStream { @Override public Object nextEntry() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } return zis.getNextEntry(); } ZIPCompressionInputStream( InputStream in, Compres... | ZIPCompressionInputStream extends CompressionInputStream { @Override public Object nextEntry() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } return zis.getNextEntry(); } ZIPCompressionInputStream( InputStream in, Compres... | ZIPCompressionInputStream extends CompressionInputStream { @Override public Object nextEntry() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } return zis.getNextEntry(); } ZIPCompressionInputStream( InputStream in, Compres... |
@Test public void testClose() throws IOException { createZIPInputStream().close(); } | @Override public void close() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } zis.close(); } | ZIPCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } zis.close(); } } | ZIPCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } zis.close(); } ZIPCompressionInputStream( InputStream in, CompressionProvider provide... | ZIPCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } zis.close(); } ZIPCompressionInputStream( InputStream in, CompressionProvider provide... | ZIPCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } zis.close(); } ZIPCompressionInputStream( InputStream in, CompressionProvider provide... |
@Test public void testRead() throws IOException { CompressionProvider provider = inStream.getCompressionProvider(); ByteArrayInputStream in = new ByteArrayInputStream( "Test".getBytes() ); inStream = new ZIPCompressionInputStream( in, provider ) { }; inStream.read( new byte[100], 0, inStream.available() ); } | @Override public int read() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } return zis.read(); } | ZIPCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } return zis.read(); } } | ZIPCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } return zis.read(); } ZIPCompressionInputStream( InputStream in, CompressionProvider pro... | ZIPCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } return zis.read(); } ZIPCompressionInputStream( InputStream in, CompressionProvider pro... | ZIPCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { ZipInputStream zis = (ZipInputStream) delegate; if ( zis == null ) { throw new IOException( "Not a valid input stream!" ); } return zis.read(); } ZIPCompressionInputStream( InputStream in, CompressionProvider pro... |
@Test public void testGetName() { ZIPCompressionProvider provider = (ZIPCompressionProvider) factory.getCompressionProviderByName( PROVIDER_NAME ); assertNotNull( provider ); assertEquals( PROVIDER_NAME, provider.getName() ); } | @Override public String getName() { return "Zip"; } | ZIPCompressionProvider implements CompressionProvider { @Override public String getName() { return "Zip"; } } | ZIPCompressionProvider implements CompressionProvider { @Override public String getName() { return "Zip"; } } | ZIPCompressionProvider implements CompressionProvider { @Override public String getName() { return "Zip"; } @Override ZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput(); @Override ZIPCompressionOutputStream createOutputStream( OutputStream out ); @Override boolean supports... | ZIPCompressionProvider implements CompressionProvider { @Override public String getName() { return "Zip"; } @Override ZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput(); @Override ZIPCompressionOutputStream createOutputStream( OutputStream out ); @Override boolean supports... |
@Test public void testCreateInputStream() throws IOException { ZIPCompressionProvider provider = (ZIPCompressionProvider) factory.getCompressionProviderByName( PROVIDER_NAME ); ByteArrayInputStream in = new ByteArrayInputStream( "Test".getBytes() ); ZipInputStream zis = new ZipInputStream( in ); ZIPCompressionInputStre... | @Override public ZIPCompressionInputStream createInputStream( InputStream in ) throws IOException { return new ZIPCompressionInputStream( in, this ); } | ZIPCompressionProvider implements CompressionProvider { @Override public ZIPCompressionInputStream createInputStream( InputStream in ) throws IOException { return new ZIPCompressionInputStream( in, this ); } } | ZIPCompressionProvider implements CompressionProvider { @Override public ZIPCompressionInputStream createInputStream( InputStream in ) throws IOException { return new ZIPCompressionInputStream( in, this ); } } | ZIPCompressionProvider implements CompressionProvider { @Override public ZIPCompressionInputStream createInputStream( InputStream in ) throws IOException { return new ZIPCompressionInputStream( in, this ); } @Override ZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput(); @Ov... | ZIPCompressionProvider implements CompressionProvider { @Override public ZIPCompressionInputStream createInputStream( InputStream in ) throws IOException { return new ZIPCompressionInputStream( in, this ); } @Override ZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput(); @Ov... |
@Test public void testCreateOutputStream() throws IOException { ZIPCompressionProvider provider = (ZIPCompressionProvider) factory.getCompressionProviderByName( PROVIDER_NAME ); ByteArrayOutputStream out = new ByteArrayOutputStream(); ZipOutputStream zos = new ZipOutputStream( out ); ZIPCompressionOutputStream outStrea... | @Override public ZIPCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new ZIPCompressionOutputStream( out, this ); } | ZIPCompressionProvider implements CompressionProvider { @Override public ZIPCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new ZIPCompressionOutputStream( out, this ); } } | ZIPCompressionProvider implements CompressionProvider { @Override public ZIPCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new ZIPCompressionOutputStream( out, this ); } } | ZIPCompressionProvider implements CompressionProvider { @Override public ZIPCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new ZIPCompressionOutputStream( out, this ); } @Override ZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput(... | ZIPCompressionProvider implements CompressionProvider { @Override public ZIPCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new ZIPCompressionOutputStream( out, this ); } @Override ZIPCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput(... |
@Test public void testClose() throws IOException { CompressionProvider provider = outStream.getCompressionProvider(); ByteArrayOutputStream out = new ByteArrayOutputStream(); outStream = new ZIPCompressionOutputStream( out, provider ); outStream.close(); } | @Override public void close() throws IOException { ZipOutputStream zos = (ZipOutputStream) delegate; zos.flush(); zos.closeEntry(); zos.finish(); zos.close(); } | ZIPCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { ZipOutputStream zos = (ZipOutputStream) delegate; zos.flush(); zos.closeEntry(); zos.finish(); zos.close(); } } | ZIPCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { ZipOutputStream zos = (ZipOutputStream) delegate; zos.flush(); zos.closeEntry(); zos.finish(); zos.close(); } ZIPCompressionOutputStream( OutputStream out, CompressionProvider provider ); } | ZIPCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { ZipOutputStream zos = (ZipOutputStream) delegate; zos.flush(); zos.closeEntry(); zos.finish(); zos.close(); } ZIPCompressionOutputStream( OutputStream out, CompressionProvider provider ); @Override void close... | ZIPCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { ZipOutputStream zos = (ZipOutputStream) delegate; zos.flush(); zos.closeEntry(); zos.finish(); zos.close(); } ZIPCompressionOutputStream( OutputStream out, CompressionProvider provider ); @Override void close... |
@Test public void testAddEntryAndWrite() throws IOException { CompressionProvider provider = outStream.getCompressionProvider(); ByteArrayOutputStream out = new ByteArrayOutputStream(); outStream = new ZIPCompressionOutputStream( out, provider ); outStream.addEntry( "./test.zip", null ); outStream.write( "Test".getByte... | @Override public void addEntry( String filename, String extension ) throws IOException { int index = filename.lastIndexOf( Const.FILE_SEPARATOR ); String entryPath; if ( index != -1 ) { entryPath = filename.substring( index + 1 ); } else { entryPath = filename; } index = entryPath.toLowerCase().lastIndexOf( ".zip" ); i... | ZIPCompressionOutputStream extends CompressionOutputStream { @Override public void addEntry( String filename, String extension ) throws IOException { int index = filename.lastIndexOf( Const.FILE_SEPARATOR ); String entryPath; if ( index != -1 ) { entryPath = filename.substring( index + 1 ); } else { entryPath = filenam... | ZIPCompressionOutputStream extends CompressionOutputStream { @Override public void addEntry( String filename, String extension ) throws IOException { int index = filename.lastIndexOf( Const.FILE_SEPARATOR ); String entryPath; if ( index != -1 ) { entryPath = filename.substring( index + 1 ); } else { entryPath = filenam... | ZIPCompressionOutputStream extends CompressionOutputStream { @Override public void addEntry( String filename, String extension ) throws IOException { int index = filename.lastIndexOf( Const.FILE_SEPARATOR ); String entryPath; if ( index != -1 ) { entryPath = filename.substring( index + 1 ); } else { entryPath = filenam... | ZIPCompressionOutputStream extends CompressionOutputStream { @Override public void addEntry( String filename, String extension ) throws IOException { int index = filename.lastIndexOf( Const.FILE_SEPARATOR ); String entryPath; if ( index != -1 ) { entryPath = filename.substring( index + 1 ); } else { entryPath = filenam... |
@Test public void testGetName() { SnappyCompressionProvider provider = (SnappyCompressionProvider) factory.getCompressionProviderByName( PROVIDER_NAME ); assertNotNull( provider ); assertEquals( PROVIDER_NAME, provider.getName() ); } | @Override public String getName() { return "Snappy"; } | SnappyCompressionProvider implements CompressionProvider { @Override public String getName() { return "Snappy"; } } | SnappyCompressionProvider implements CompressionProvider { @Override public String getName() { return "Snappy"; } } | SnappyCompressionProvider implements CompressionProvider { @Override public String getName() { return "Snappy"; } @Override SnappyCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput(); @Override SnappyCompressionOutputStream createOutputStream( OutputStream out ); @Override bool... | SnappyCompressionProvider implements CompressionProvider { @Override public String getName() { return "Snappy"; } @Override SnappyCompressionInputStream createInputStream( InputStream in ); @Override boolean supportsInput(); @Override SnappyCompressionOutputStream createOutputStream( OutputStream out ); @Override bool... |
@Test public void testCreateInputStream() throws IOException { SnappyCompressionProvider provider = (SnappyCompressionProvider) factory.getCompressionProviderByName( PROVIDER_NAME ); SnappyInputStream in = createSnappyInputStream(); SnappyCompressionInputStream inStream = new SnappyCompressionInputStream( in, provider ... | @Override public SnappyCompressionInputStream createInputStream( InputStream in ) throws IOException { return new SnappyCompressionInputStream( in, this ); } | SnappyCompressionProvider implements CompressionProvider { @Override public SnappyCompressionInputStream createInputStream( InputStream in ) throws IOException { return new SnappyCompressionInputStream( in, this ); } } | SnappyCompressionProvider implements CompressionProvider { @Override public SnappyCompressionInputStream createInputStream( InputStream in ) throws IOException { return new SnappyCompressionInputStream( in, this ); } } | SnappyCompressionProvider implements CompressionProvider { @Override public SnappyCompressionInputStream createInputStream( InputStream in ) throws IOException { return new SnappyCompressionInputStream( in, this ); } @Override SnappyCompressionInputStream createInputStream( InputStream in ); @Override boolean supports... | SnappyCompressionProvider implements CompressionProvider { @Override public SnappyCompressionInputStream createInputStream( InputStream in ) throws IOException { return new SnappyCompressionInputStream( in, this ); } @Override SnappyCompressionInputStream createInputStream( InputStream in ); @Override boolean supports... |
@Test public void testSetUpJettyOptionsAsSystemParameters() throws KettleXMLException { Node configNode = getConfigNode( getConfigWithAllOptions() ); slServerConfig.setUpJettyOptions( configNode ); assertTrue( "Expected containing jetty option " + EXPECTED_ACCEPTORS_KEY, System.getProperties().containsKey( EXPECTED_ACC... | protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue() ); } } } | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... |
@Test public void testGetString() throws Exception { assertEquals( "Database Connection", Messages.getString( "DatabaseDialog.Shell.title" ) ); assertEquals( "!Not.A.Message!", Messages.getString( "Not.A.Message" ) ); assertEquals( "MyParam: JDBC options help", Messages.getString( "DatabaseDialog.JDBCOptions.Tab", "MyP... | public static String getString( String key ) { try { return RESOURCE_BUNDLE.getString( key ); } catch ( MissingResourceException e ) { return '!' + key + '!'; } } | Messages { public static String getString( String key ) { try { return RESOURCE_BUNDLE.getString( key ); } catch ( MissingResourceException e ) { return '!' + key + '!'; } } } | Messages { public static String getString( String key ) { try { return RESOURCE_BUNDLE.getString( key ); } catch ( MissingResourceException e ) { return '!' + key + '!'; } } private Messages(); } | Messages { public static String getString( String key ) { try { return RESOURCE_BUNDLE.getString( key ); } catch ( MissingResourceException e ) { return '!' + key + '!'; } } private Messages(); static ResourceBundle getBundle(); static String getString( String key ); static String getString( String key, String param1 ... | Messages { public static String getString( String key ) { try { return RESOURCE_BUNDLE.getString( key ); } catch ( MissingResourceException e ) { return '!' + key + '!'; } } private Messages(); static ResourceBundle getBundle(); static String getString( String key ); static String getString( String key, String param1 ... |
@Test public void testCreateOutputStream() throws IOException { SnappyCompressionProvider provider = (SnappyCompressionProvider) factory.getCompressionProviderByName( PROVIDER_NAME ); ByteArrayOutputStream out = new ByteArrayOutputStream(); SnappyCompressionOutputStream outStream = new SnappyCompressionOutputStream( ou... | @Override public SnappyCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new SnappyCompressionOutputStream( out, this ); } | SnappyCompressionProvider implements CompressionProvider { @Override public SnappyCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new SnappyCompressionOutputStream( out, this ); } } | SnappyCompressionProvider implements CompressionProvider { @Override public SnappyCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new SnappyCompressionOutputStream( out, this ); } } | SnappyCompressionProvider implements CompressionProvider { @Override public SnappyCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new SnappyCompressionOutputStream( out, this ); } @Override SnappyCompressionInputStream createInputStream( InputStream in ); @Override boolean su... | SnappyCompressionProvider implements CompressionProvider { @Override public SnappyCompressionOutputStream createOutputStream( OutputStream out ) throws IOException { return new SnappyCompressionOutputStream( out, this ); } @Override SnappyCompressionInputStream createInputStream( InputStream in ); @Override boolean su... |
@Test public void testNextEntry() throws IOException { assertNull( inStream.nextEntry() ); } | @Override public Object nextEntry() throws IOException { return null; } | SnappyCompressionInputStream extends CompressionInputStream { @Override public Object nextEntry() throws IOException { return null; } } | SnappyCompressionInputStream extends CompressionInputStream { @Override public Object nextEntry() throws IOException { return null; } SnappyCompressionInputStream( InputStream in, CompressionProvider provider ); } | SnappyCompressionInputStream extends CompressionInputStream { @Override public Object nextEntry() throws IOException { return null; } SnappyCompressionInputStream( InputStream in, CompressionProvider provider ); @Override void close(); @Override int read(); @Override Object nextEntry(); } | SnappyCompressionInputStream extends CompressionInputStream { @Override public Object nextEntry() throws IOException { return null; } SnappyCompressionInputStream( InputStream in, CompressionProvider provider ); @Override void close(); @Override int read(); @Override Object nextEntry(); } |
@Test public void testClose() throws IOException { inStream = new SnappyCompressionInputStream( createSnappyInputStream(), provider ); inStream.close(); } | @Override public void close() throws IOException { ( (SnappyInputStream) delegate ).close(); } | SnappyCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { ( (SnappyInputStream) delegate ).close(); } } | SnappyCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { ( (SnappyInputStream) delegate ).close(); } SnappyCompressionInputStream( InputStream in, CompressionProvider provider ); } | SnappyCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { ( (SnappyInputStream) delegate ).close(); } SnappyCompressionInputStream( InputStream in, CompressionProvider provider ); @Override void close(); @Override int read(); @Override Object nextEntry(); } | SnappyCompressionInputStream extends CompressionInputStream { @Override public void close() throws IOException { ( (SnappyInputStream) delegate ).close(); } SnappyCompressionInputStream( InputStream in, CompressionProvider provider ); @Override void close(); @Override int read(); @Override Object nextEntry(); } |
@Test public void testRead() throws IOException { assertEquals( inStream.available(), inStream.read( new byte[100], 0, inStream.available() ) ); } | @Override public int read() throws IOException { return ( (SnappyInputStream) delegate ).read(); } | SnappyCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { return ( (SnappyInputStream) delegate ).read(); } } | SnappyCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { return ( (SnappyInputStream) delegate ).read(); } SnappyCompressionInputStream( InputStream in, CompressionProvider provider ); } | SnappyCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { return ( (SnappyInputStream) delegate ).read(); } SnappyCompressionInputStream( InputStream in, CompressionProvider provider ); @Override void close(); @Override int read(); @Override Object nextEntry(); } | SnappyCompressionInputStream extends CompressionInputStream { @Override public int read() throws IOException { return ( (SnappyInputStream) delegate ).read(); } SnappyCompressionInputStream( InputStream in, CompressionProvider provider ); @Override void close(); @Override int read(); @Override Object nextEntry(); } |
@Test public void testClose() throws IOException { CompressionProvider provider = outStream.getCompressionProvider(); ByteArrayOutputStream out = new ByteArrayOutputStream(); outStream = new SnappyCompressionOutputStream( out, provider ); outStream.close(); } | @Override public void close() throws IOException { SnappyOutputStream zos = (SnappyOutputStream) delegate; zos.flush(); zos.close(); } | SnappyCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { SnappyOutputStream zos = (SnappyOutputStream) delegate; zos.flush(); zos.close(); } } | SnappyCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { SnappyOutputStream zos = (SnappyOutputStream) delegate; zos.flush(); zos.close(); } SnappyCompressionOutputStream( OutputStream out, CompressionProvider provider ); } | SnappyCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { SnappyOutputStream zos = (SnappyOutputStream) delegate; zos.flush(); zos.close(); } SnappyCompressionOutputStream( OutputStream out, CompressionProvider provider ); @Override void close(); @Override void w... | SnappyCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { SnappyOutputStream zos = (SnappyOutputStream) delegate; zos.flush(); zos.close(); } SnappyCompressionOutputStream( OutputStream out, CompressionProvider provider ); @Override void close(); @Override void w... |
@Test public void testWrite() throws IOException { CompressionProvider provider = outStream.getCompressionProvider(); ByteArrayOutputStream out = new ByteArrayOutputStream(); outStream = new SnappyCompressionOutputStream( out, provider ); outStream.write( "Test".getBytes() ); } | @Override public void write( int b ) throws IOException { delegate.write( b ); } | SnappyCompressionOutputStream extends CompressionOutputStream { @Override public void write( int b ) throws IOException { delegate.write( b ); } } | SnappyCompressionOutputStream extends CompressionOutputStream { @Override public void write( int b ) throws IOException { delegate.write( b ); } SnappyCompressionOutputStream( OutputStream out, CompressionProvider provider ); } | SnappyCompressionOutputStream extends CompressionOutputStream { @Override public void write( int b ) throws IOException { delegate.write( b ); } SnappyCompressionOutputStream( OutputStream out, CompressionProvider provider ); @Override void close(); @Override void write( int b ); } | SnappyCompressionOutputStream extends CompressionOutputStream { @Override public void write( int b ) throws IOException { delegate.write( b ); } SnappyCompressionOutputStream( OutputStream out, CompressionProvider provider ); @Override void close(); @Override void write( int b ); } |
@Test public void jsToNumber_Undefined() throws Exception { assertNull( JavaScriptUtils.jsToNumber( null, UNDEFINED ) ); } | public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.getN... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... |
@Test public void jsToNumber_NativeJavaObject_Double() throws Exception { Scriptable value = getDoubleValue(); Number number = JavaScriptUtils.jsToNumber( value, JAVA_OBJECT ); assertEquals( 1.0, number.doubleValue(), 1e-6 ); } | public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.getN... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... |
@Test public void jsToNumber_NativeJavaObject_Int() throws Exception { Scriptable value = getIntValue(); Number number = JavaScriptUtils.jsToNumber( value, JAVA_OBJECT ); assertEquals( 1.0, number.doubleValue(), 1e-6 ); } | public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.getN... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... |
@Test public void jsToNumber_NativeNumber() throws Exception { Scriptable value = Context.toObject( 1.0, scope ); Number number = JavaScriptUtils.jsToNumber( value, NATIVE_NUMBER ); assertEquals( 1.0, number.doubleValue(), 1e-6 ); } | public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.getN... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... |
@Test public void testDoNotSetUpJettyOptionsAsSystemParameters_WhenNoOptionsNode() throws KettleXMLException { Node configNode = getConfigNode( getConfigWithNoOptionsNode() ); slServerConfig.setUpJettyOptions( configNode ); assertFalse( "There should not be any jetty option but it is here: " + EXPECTED_ACCEPTORS_KEY, S... | protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue() ); } } } | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... |
@Test public void jsToNumber_JavaNumber() throws Exception { Number number = JavaScriptUtils.jsToNumber( 1.0, Double.class.getName() ); assertEquals( 1.0, number.doubleValue(), 1e-6 ); } | public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.getN... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... | JavaScriptUtils { public static Number jsToNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.clas... |
@Test public void jsToInteger_Undefined() throws Exception { assertNull( JavaScriptUtils.jsToInteger( null, Undefined.class ) ); } | public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else if ( classType.equa... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... |
@Test public void jsToInteger_NaturalNumbers() throws Exception { Number[] naturalNumbers = new Number[] { (byte) 1, (short) 1, 1, (long) 1 }; for ( Number number : naturalNumbers ) { assertEquals( Long.valueOf( 1 ), JavaScriptUtils.jsToInteger( number, number.getClass() ) ); } } | public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else if ( classType.equa... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... |
@Test public void jsToInteger_String() throws Exception { assertEquals( Long.valueOf( 1 ), JavaScriptUtils.jsToInteger( "1", String.class ) ); } | public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else if ( classType.equa... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... |
@Test( expected = NumberFormatException.class ) public void jsToInteger_String_Unparseable() throws Exception { JavaScriptUtils.jsToInteger( "q", String.class ); } | public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else if ( classType.equa... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... |
@Test public void jsToInteger_Double() throws Exception { assertEquals( Long.valueOf( 1 ), JavaScriptUtils.jsToInteger( 1.0, Double.class ) ); } | public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else if ( classType.equa... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... |
@Test public void jsToInteger_NativeJavaObject_Int() throws Exception { Scriptable value = getIntValue(); assertEquals( Long.valueOf( 1 ), JavaScriptUtils.jsToInteger( value, NativeJavaObject.class ) ); } | public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else if ( classType.equa... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... |
@Test public void jsToInteger_NativeJavaObject_Double() throws Exception { Scriptable value = getDoubleValue(); assertEquals( Long.valueOf( 1 ), JavaScriptUtils.jsToInteger( value, NativeJavaObject.class ) ); } | public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else if ( classType.equa... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... |
@Test public void jsToInteger_Other_Int() throws Exception { assertEquals( Long.valueOf( 1 ), JavaScriptUtils.jsToInteger( 1, getClass() ) ); } | public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else if ( classType.equa... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... |
@Test( expected = NumberFormatException.class ) public void jsToInteger_Other_String() throws Exception { JavaScriptUtils.jsToInteger( "qwerty", getClass() ); } | public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else if ( classType.equa... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... | JavaScriptUtils { public static Long jsToInteger( Object value, Class<?> clazz ) { if ( Number.class.isAssignableFrom( clazz ) ) { return ( (Number) value ).longValue(); } else { String classType = clazz.getName(); if ( classType.equalsIgnoreCase( "java.lang.String" ) ) { return ( new Long( (String) value ) ); } else i... |
@Test public void testDoNotSetUpJettyOptionsAsSystemParameters_WhenEmptyOptionsNode() throws KettleXMLException { Node configNode = getConfigNode( getConfigWithEmptyOptionsNode() ); slServerConfig.setUpJettyOptions( configNode ); assertFalse( "There should not be any jetty option but it is here: " + EXPECTED_ACCEPTORS_... | protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue() ); } } } | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... | SlaveServerConfig { protected void setUpJettyOptions( Node node ) { Map<String, String> jettyOptions = parseJettyOptions( node ); if ( jettyOptions != null && jettyOptions.size() > 0 ) { for ( Entry<String, String> jettyOption : jettyOptions.entrySet() ) { System.setProperty( jettyOption.getKey(), jettyOption.getValue(... |
@Test public void jsToString_Undefined() throws Exception { assertEquals( "null", JavaScriptUtils.jsToString( null, UNDEFINED ) ); } | public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); } catch ( Exceptio... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... |
@Test public void jsToString_NativeJavaObject_Int() throws Exception { assertEquals( "1", JavaScriptUtils.jsToString( getIntValue(), JAVA_OBJECT ).trim() ); } | public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); } catch ( Exceptio... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... |
@Test public void jsToString_NativeJavaObject_Double() throws Exception { assertEquals( "1.0", JavaScriptUtils.jsToString( getDoubleValue(), JAVA_OBJECT ).trim() ); } | public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); } catch ( Exceptio... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... |
@Test public void jsToString_String() throws Exception { assertEquals( "qwerty", JavaScriptUtils.jsToString( "qwerty", String.class.getName() ) ); } | public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); } catch ( Exceptio... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... | JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); ... |
@Test public void jsToDate_Undefined() throws Exception { assertNull( JavaScriptUtils.jsToDate( null, UNDEFINED ) ); } | public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( value ); } else if ( ... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... |
@Test public void jsToDate_NativeDate() throws Exception { Date date = new Date( 1 ); Scriptable value = ctx.newObject( scope, "Date", new Object[] { date.getTime() } ); assertEquals( date, JavaScriptUtils.jsToDate( value, "org.mozilla.javascript.NativeDate" ) ); } | public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( value ); } else if ( ... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... |
@Test public void jsToDate_NativeJavaObject() throws Exception { Scriptable value = getIntValue(); assertEquals( new Date( 1 ), JavaScriptUtils.jsToDate( value, JAVA_OBJECT ) ); } | public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( value ); } else if ( ... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... |
@Test public void jsToDate_Double() throws Exception { assertEquals( new Date( 1 ), JavaScriptUtils.jsToDate( 1.0, Double.class.getName() ) ); } | public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( value ); } else if ( ... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... |
@Test public void jsToDate_String() throws Exception { assertEquals( new Date( 1 ), JavaScriptUtils.jsToDate( "1.0", String.class.getName() ) ); } | public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( value ); } else if ( ... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... |
@Test( expected = NumberFormatException.class ) public void jsToDate_String_Unparseable() throws Exception { JavaScriptUtils.jsToDate( "qwerty", String.class.getName() ); } | public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( value ); } else if ( ... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... | JavaScriptUtils { public static Date jsToDate( Object value, String classType ) throws KettleValueException { double dbl; if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeDate" ) ) { dbl = Context.toNumber( val... |
@Test public void testParseJettyOption_Acceptors() throws KettleXMLException { Node configNode = getConfigNode( getConfigWithAcceptorsOnlyOption() ); Map<String, String> parseJettyOptions = slServerConfig.parseJettyOptions( configNode ); assertNotNull( parseJettyOptions ); assertEquals( 1, parseJettyOptions.size() ); a... | protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOptionsNode, XML_TAG_ACC... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... |
@Test public void jsToBigNumber_Undefined() throws Exception { assertNull( JavaScriptUtils.jsToBigNumber( null, UNDEFINED ) ); } | public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDecimal( nb.doubleVal... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... |
@Test public void jsToBigNumber_NativeNumber() throws Exception { Scriptable value = Context.toObject( 1.0, scope ); BigDecimal number = JavaScriptUtils.jsToBigNumber( value, NATIVE_NUMBER ); assertEquals( 1.0, number.doubleValue(), 1e-6 ); } | public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDecimal( nb.doubleVal... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... |
@Test public void jsToBigNumber_NativeJavaObject_Int() throws Exception { assertEquals( 1.0, JavaScriptUtils.jsToBigNumber( getIntValue(), JAVA_OBJECT ).doubleValue(), 1e-6 ); } | public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDecimal( nb.doubleVal... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... |
@Test public void jsToBigNumber_NativeJavaObject_Double() throws Exception { assertEquals( 1.0, JavaScriptUtils.jsToBigNumber( getDoubleValue(), JAVA_OBJECT ).doubleValue(), 1e-6 ); } | public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDecimal( nb.doubleVal... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... |
@Test public void jsToBigNumber_NativeJavaObject_BigDecimal() throws Exception { Value value = new Value(); value.setValue( BigDecimal.ONE ); Scriptable object = Context.toObject( value, scope ); assertEquals( 1.0, JavaScriptUtils.jsToBigNumber( object, JAVA_OBJECT ).doubleValue(), 1e-6 ); } | public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDecimal( nb.doubleVal... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... |
@Test public void jsToBigNumber_NaturalNumbers() throws Exception { Number[] naturalNumbers = new Number[] { (byte) 1, (short) 1, 1, (long) 1 }; for ( Number number : naturalNumbers ) { assertEquals( 1.0, JavaScriptUtils.jsToBigNumber( number, number.getClass().getName() ).doubleValue(), 1e-6 ); } } | public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDecimal( nb.doubleVal... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... |
@Test public void jsToBigNumber_Double() throws Exception { assertEquals( 1.0, JavaScriptUtils.jsToBigNumber( 1.0, Double.class.getName() ).doubleValue(), 1e-6 ); } | public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDecimal( nb.doubleVal... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... |
@Test public void jsToBigNumber_String() throws Exception { assertEquals( 1.0, JavaScriptUtils.jsToBigNumber( "1", String.class.getName() ).doubleValue(), 1e-6 ); } | public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDecimal( nb.doubleVal... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... |
@Test( expected = RuntimeException.class ) public void jsToBigNumber_UnknownClass() throws Exception { JavaScriptUtils.jsToBigNumber( "1", "qwerty" ); } | public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDecimal( nb.doubleVal... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... | JavaScriptUtils { public static BigDecimal jsToBigNumber( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { return null; } else if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeNumber" ) ) { Number nb = Context.toNumber( value ); return new BigDec... |
@Test( expected = RuntimeException.class ) public void convertFromJs_TypeNone() throws Exception { JavaScriptUtils.convertFromJs( null, ValueMetaInterface.TYPE_NONE, "qwerty" ); } | public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInteger( value, value... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... |
@Test public void testParseJettyOption_AcceptQueueSize() throws KettleXMLException { Node configNode = getConfigNode( getConfigWithAcceptQueueSizeOnlyOption() ); Map<String, String> parseJettyOptions = slServerConfig.parseJettyOptions( configNode ); assertNotNull( parseJettyOptions ); assertEquals( 1, parseJettyOptions... | protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOptionsNode, XML_TAG_ACC... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... |
@Test public void convertFromJs_TypeBoolean() throws Exception { Object o = new Object(); Object o2 = JavaScriptUtils.convertFromJs( o, ValueMetaInterface.TYPE_BOOLEAN, "qwerty" ); assertEquals( o, o2 ); } | public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInteger( value, value... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... |
@Test public void convertFromJs_TypeBinary() throws Exception { byte[] bytes = new byte[] { 0, 1 }; Object converted = JavaScriptUtils.convertFromJs( bytes, ValueMetaInterface.TYPE_BINARY, "qwerty" ); assertThat( converted, is( instanceOf( byte[].class ) ) ); assertArrayEquals( bytes, (byte[]) converted ); } | public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInteger( value, value... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... | JavaScriptUtils { public static Object convertFromJs( Object value, int type, String fieldName ) throws KettleValueException { String classType = value.getClass().getName(); switch ( type ) { case ValueMetaInterface.TYPE_NUMBER: return jsToNumber( value, classType ); case ValueMetaInterface.TYPE_INTEGER: return jsToInt... |
@Test public void testLogError() { streamLogger = new ConfigurableStreamLogger( log, is, LogLevel.ERROR, PREFIX ); streamLogger.run(); Mockito.verify( log ).logError( OUT1 ); Mockito.verify( log ).logError( OUT2 ); } | public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case B... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... |
@Test public void testLogMinimal() { streamLogger = new ConfigurableStreamLogger( log, is, LogLevel.MINIMAL, PREFIX ); streamLogger.run(); Mockito.verify( log ).logMinimal( OUT1 ); Mockito.verify( log ).logMinimal( OUT2 ); } | public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case B... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... |
@Test public void testLogBasic() { streamLogger = new ConfigurableStreamLogger( log, is, LogLevel.BASIC, PREFIX ); streamLogger.run(); Mockito.verify( log ).logBasic( OUT1 ); Mockito.verify( log ).logBasic( OUT2 ); } | public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case B... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... |
@Test public void testLogDetailed() { streamLogger = new ConfigurableStreamLogger( log, is, LogLevel.DETAILED, PREFIX ); streamLogger.run(); Mockito.verify( log ).logDetailed( OUT1 ); Mockito.verify( log ).logDetailed( OUT2 ); } | public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case B... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... |
@Test public void testLogDebug() { streamLogger = new ConfigurableStreamLogger( log, is, LogLevel.DEBUG, PREFIX ); streamLogger.run(); Mockito.verify( log ).logDebug( OUT1 ); Mockito.verify( log ).logDebug( OUT2 ); } | public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case B... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... |
@Test public void testLogRowlevel() { streamLogger = new ConfigurableStreamLogger( log, is, LogLevel.ROWLEVEL, PREFIX ); streamLogger.run(); Mockito.verify( log ).logRowlevel( OUT1 ); Mockito.verify( log ).logRowlevel( OUT2 ); } | public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MINIMAL: log.logMinimal( logEntry ); break; case B... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... | ConfigurableStreamLogger implements Runnable { public void run() { try { InputStreamReader isr = new InputStreamReader( this.is ); BufferedReader br = new BufferedReader( isr ); String line = null; while ( ( line = br.readLine() ) != null ) { String logEntry = this.type + " " + line; switch ( this.logLevel ) { case MIN... |
@Test( expected = KettleException.class ) public void readingJobRepoThrowsExceptionWhenParsingXmlWithBigAmountOfExternalEntities() throws Exception { SerializationHelper.readJobRep( null, repo, null, new ArrayList<>() ); } | public static void readJobRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String jobXML = rep.getJobEntryAttributeString( id_step, "job-xml" ); ByteArrayInputStream bais = new ByteArrayInputStream( jobXML.getBytes() ); Document doc = XMLParserFactoryPr... | SerializationHelper { public static void readJobRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String jobXML = rep.getJobEntryAttributeString( id_step, "job-xml" ); ByteArrayInputStream bais = new ByteArrayInputStream( jobXML.getBytes() ); Document do... | SerializationHelper { public static void readJobRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String jobXML = rep.getJobEntryAttributeString( id_step, "job-xml" ); ByteArrayInputStream bais = new ByteArrayInputStream( jobXML.getBytes() ); Document do... | SerializationHelper { public static void readJobRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String jobXML = rep.getJobEntryAttributeString( id_step, "job-xml" ); ByteArrayInputStream bais = new ByteArrayInputStream( jobXML.getBytes() ); Document do... | SerializationHelper { public static void readJobRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String jobXML = rep.getJobEntryAttributeString( id_step, "job-xml" ); ByteArrayInputStream bais = new ByteArrayInputStream( jobXML.getBytes() ); Document do... |
@Test( expected = KettleException.class ) public void readingStepRepoThrowsExceptionWhenParsingXmlWithBigAmountOfExternalEntities() throws Exception { SerializationHelper.readStepRep( null, repo, null, new ArrayList<>() ); } | public static void readStepRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String stepXML = rep.getStepAttributeString( id_step, "step-xml" ); ByteArrayInputStream bais = new ByteArrayInputStream( stepXML.getBytes() ); Document doc = XMLParserFactoryPr... | SerializationHelper { public static void readStepRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String stepXML = rep.getStepAttributeString( id_step, "step-xml" ); ByteArrayInputStream bais = new ByteArrayInputStream( stepXML.getBytes() ); Document do... | SerializationHelper { public static void readStepRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String stepXML = rep.getStepAttributeString( id_step, "step-xml" ); ByteArrayInputStream bais = new ByteArrayInputStream( stepXML.getBytes() ); Document do... | SerializationHelper { public static void readStepRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String stepXML = rep.getStepAttributeString( id_step, "step-xml" ); ByteArrayInputStream bais = new ByteArrayInputStream( stepXML.getBytes() ); Document do... | SerializationHelper { public static void readStepRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String stepXML = rep.getStepAttributeString( id_step, "step-xml" ); ByteArrayInputStream bais = new ByteArrayInputStream( stepXML.getBytes() ); Document do... |
@Test public void testParseJettyOption_LowResourcesMaxIdleTime() throws KettleXMLException { Node configNode = getConfigNode( getConfigWithLowResourcesMaxIdleTimeeOnlyOption() ); Map<String, String> parseJettyOptions = slServerConfig.parseJettyOptions( configNode ); assertNotNull( parseJettyOptions ); assertEquals( 1, ... | protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOptionsNode, XML_TAG_ACC... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... |
@Test public void testgetResultRowMeta() { RowMetaInterface rm = StringSearchResult.getResultRowMeta(); assertNotNull( rm ); assertEquals( 4, rm.getValueMetaList().size() ); assertEquals( ValueMetaInterface.TYPE_STRING, rm.getValueMeta( 0 ).getType() ); assertEquals( BaseMessages.getString( PKG, "SearchResult.TransOrJo... | public static final RowMetaInterface getResultRowMeta() { RowMetaInterface rowMeta = new RowMeta(); rowMeta.addValueMeta( new ValueMetaString( BaseMessages.getString( PKG, "SearchResult.TransOrJob" ) ) ); rowMeta.addValueMeta( new ValueMetaString( BaseMessages.getString( PKG, "SearchResult.StepDatabaseNotice" ) ) ); ro... | StringSearchResult { public static final RowMetaInterface getResultRowMeta() { RowMetaInterface rowMeta = new RowMeta(); rowMeta.addValueMeta( new ValueMetaString( BaseMessages.getString( PKG, "SearchResult.TransOrJob" ) ) ); rowMeta.addValueMeta( new ValueMetaString( BaseMessages.getString( PKG, "SearchResult.StepData... | StringSearchResult { public static final RowMetaInterface getResultRowMeta() { RowMetaInterface rowMeta = new RowMeta(); rowMeta.addValueMeta( new ValueMetaString( BaseMessages.getString( PKG, "SearchResult.TransOrJob" ) ) ); rowMeta.addValueMeta( new ValueMetaString( BaseMessages.getString( PKG, "SearchResult.StepData... | StringSearchResult { public static final RowMetaInterface getResultRowMeta() { RowMetaInterface rowMeta = new RowMeta(); rowMeta.addValueMeta( new ValueMetaString( BaseMessages.getString( PKG, "SearchResult.TransOrJob" ) ) ); rowMeta.addValueMeta( new ValueMetaString( BaseMessages.getString( PKG, "SearchResult.StepData... | StringSearchResult { public static final RowMetaInterface getResultRowMeta() { RowMetaInterface rowMeta = new RowMeta(); rowMeta.addValueMeta( new ValueMetaString( BaseMessages.getString( PKG, "SearchResult.TransOrJob" ) ) ); rowMeta.addValueMeta( new ValueMetaString( BaseMessages.getString( PKG, "SearchResult.StepData... |
@Test public void test() throws Exception { String id = "1"; String logMessage = "Log message"; FileObject fileObject = mock( FileObject.class ); FileContent fileContent = mock( FileContent.class ); OutputStream outputStream = mock( OutputStream.class ); when( fileObject.getContent() ).thenReturn( fileContent ); when( ... | public synchronized void flush() { try { StringBuffer buffer = this.buffer.getBuffer(); logFileOutputStream.write( buffer.toString().getBytes() ); logFileOutputStream.flush(); } catch ( Exception e ) { exception = new KettleException( "There was an error logging to file '" + logFile + "'", e ); } } | LogChannelFileWriter { public synchronized void flush() { try { StringBuffer buffer = this.buffer.getBuffer(); logFileOutputStream.write( buffer.toString().getBytes() ); logFileOutputStream.flush(); } catch ( Exception e ) { exception = new KettleException( "There was an error logging to file '" + logFile + "'", e ); }... | LogChannelFileWriter { public synchronized void flush() { try { StringBuffer buffer = this.buffer.getBuffer(); logFileOutputStream.write( buffer.toString().getBytes() ); logFileOutputStream.flush(); } catch ( Exception e ) { exception = new KettleException( "There was an error logging to file '" + logFile + "'", e ); }... | LogChannelFileWriter { public synchronized void flush() { try { StringBuffer buffer = this.buffer.getBuffer(); logFileOutputStream.write( buffer.toString().getBytes() ); logFileOutputStream.flush(); } catch ( Exception e ) { exception = new KettleException( "There was an error logging to file '" + logFile + "'", e ); }... | LogChannelFileWriter { public synchronized void flush() { try { StringBuffer buffer = this.buffer.getBuffer(); logFileOutputStream.write( buffer.toString().getBytes() ); logFileOutputStream.flush(); } catch ( Exception e ) { exception = new KettleException( "There was an error logging to file '" + logFile + "'", e ); }... |
@Test public void testAddJobTracker() throws Exception { final String old = System.getProperty( Const.KETTLE_MAX_JOB_TRACKER_SIZE ); final Integer maxTestSize = 30; try { System.setProperty( Const.KETTLE_MAX_JOB_TRACKER_SIZE, maxTestSize.toString() ); JobMeta jobMeta = mock( JobMeta.class ); JobTracker jobTracker = new... | public void addJobTracker( JobTracker jobTracker ) { lock.writeLock().lock(); try { jobTrackers.add( jobTracker ); while ( jobTrackers.size() > maxChildren ) { jobTrackers.removeFirst(); } } finally { lock.writeLock().unlock(); } } | JobTracker { public void addJobTracker( JobTracker jobTracker ) { lock.writeLock().lock(); try { jobTrackers.add( jobTracker ); while ( jobTrackers.size() > maxChildren ) { jobTrackers.removeFirst(); } } finally { lock.writeLock().unlock(); } } } | JobTracker { public void addJobTracker( JobTracker jobTracker ) { lock.writeLock().lock(); try { jobTrackers.add( jobTracker ); while ( jobTrackers.size() > maxChildren ) { jobTrackers.removeFirst(); } } finally { lock.writeLock().unlock(); } } JobTracker( JobMeta jobMeta ); JobTracker( JobMeta jobMeta, int maxChildre... | JobTracker { public void addJobTracker( JobTracker jobTracker ) { lock.writeLock().lock(); try { jobTrackers.add( jobTracker ); while ( jobTrackers.size() > maxChildren ) { jobTrackers.removeFirst(); } } finally { lock.writeLock().unlock(); } } JobTracker( JobMeta jobMeta ); JobTracker( JobMeta jobMeta, int maxChildre... | JobTracker { public void addJobTracker( JobTracker jobTracker ) { lock.writeLock().lock(); try { jobTrackers.add( jobTracker ); while ( jobTrackers.size() > maxChildren ) { jobTrackers.removeFirst(); } } finally { lock.writeLock().unlock(); } } JobTracker( JobMeta jobMeta ); JobTracker( JobMeta jobMeta, int maxChildre... |
@SuppressWarnings( { "rawtypes", "unchecked" } ) @Test public void testRegisterConsumerFactory() throws AuthenticationConsumptionException, AuthenticationFactoryException { AuthenticationConsumer<Object, KerberosAuthenticationProvider> authConsumer = mock( AuthenticationConsumer.class ); AuthenticationConsumerFactory<O... | public <ReturnType, CreateArgType, ConsumedType> void registerConsumerFactory( AuthenticationConsumerFactory<ReturnType, CreateArgType, ConsumedType> factory ) throws AuthenticationFactoryException { if ( !factory.getConsumedType().isInterface() && !AuthenticationProvider.class.isAssignableFrom( factory.getConsumedType... | AuthenticationManager { public <ReturnType, CreateArgType, ConsumedType> void registerConsumerFactory( AuthenticationConsumerFactory<ReturnType, CreateArgType, ConsumedType> factory ) throws AuthenticationFactoryException { if ( !factory.getConsumedType().isInterface() && !AuthenticationProvider.class.isAssignableFrom(... | AuthenticationManager { public <ReturnType, CreateArgType, ConsumedType> void registerConsumerFactory( AuthenticationConsumerFactory<ReturnType, CreateArgType, ConsumedType> factory ) throws AuthenticationFactoryException { if ( !factory.getConsumedType().isInterface() && !AuthenticationProvider.class.isAssignableFrom(... | AuthenticationManager { public <ReturnType, CreateArgType, ConsumedType> void registerConsumerFactory( AuthenticationConsumerFactory<ReturnType, CreateArgType, ConsumedType> factory ) throws AuthenticationFactoryException { if ( !factory.getConsumedType().isInterface() && !AuthenticationProvider.class.isAssignableFrom(... | AuthenticationManager { public <ReturnType, CreateArgType, ConsumedType> void registerConsumerFactory( AuthenticationConsumerFactory<ReturnType, CreateArgType, ConsumedType> factory ) throws AuthenticationFactoryException { if ( !factory.getConsumedType().isInterface() && !AuthenticationProvider.class.isAssignableFrom(... |
@Test public void testOnEnvironmentInit() throws Exception { final List<KettleLifecycleListener> listeners = new ArrayList<KettleLifecycleListener>(); listeners.add( createLifecycleListener() ); KettleLifecycleSupport kettleLifecycleSupport = new KettleLifecycleSupport(); assertNotNull( typeListenerRegistration.getValu... | public void onEnvironmentInit() throws KettleException { if ( initialized.compareAndSet( false, true ) ) { for ( KettleLifecycleListener listener : kettleLifecycleListeners.keySet() ) { onEnvironmentInit( listener ); } } } | KettleLifecycleSupport { public void onEnvironmentInit() throws KettleException { if ( initialized.compareAndSet( false, true ) ) { for ( KettleLifecycleListener listener : kettleLifecycleListeners.keySet() ) { onEnvironmentInit( listener ); } } } } | KettleLifecycleSupport { public void onEnvironmentInit() throws KettleException { if ( initialized.compareAndSet( false, true ) ) { for ( KettleLifecycleListener listener : kettleLifecycleListeners.keySet() ) { onEnvironmentInit( listener ); } } } KettleLifecycleSupport(); } | KettleLifecycleSupport { public void onEnvironmentInit() throws KettleException { if ( initialized.compareAndSet( false, true ) ) { for ( KettleLifecycleListener listener : kettleLifecycleListeners.keySet() ) { onEnvironmentInit( listener ); } } } KettleLifecycleSupport(); void onEnvironmentInit(); void onEnvironmentSh... | KettleLifecycleSupport { public void onEnvironmentInit() throws KettleException { if ( initialized.compareAndSet( false, true ) ) { for ( KettleLifecycleListener listener : kettleLifecycleListeners.keySet() ) { onEnvironmentInit( listener ); } } } KettleLifecycleSupport(); void onEnvironmentInit(); void onEnvironmentSh... |
@Test public void recordsCleanUpMethodIsCalled_JobLogTable() throws Exception { JobLogTable jobLogTable = JobLogTable.getDefault( mockedVariableSpace, hasDatabasesInterface ); setAllTableParamsDefault( jobLogTable ); doCallRealMethod().when( mockedJob ).writeLogTableInformation( jobLogTable, LogStatus.END ); mockedJob.... | protected void writeLogTableInformation( JobLogTable jobLogTable, LogStatus status ) throws KettleJobException, KettleDatabaseException { boolean cleanLogRecords = status.equals( LogStatus.END ); String tableName = jobLogTable.getActualTableName(); DatabaseMeta logcon = jobLogTable.getDatabaseMeta(); Database ldb = cre... | Job extends Thread implements VariableSpace, NamedParams, HasLogChannelInterface, LoggingObjectInterface,
ExecutorInterface, ExtensionDataInterface { protected void writeLogTableInformation( JobLogTable jobLogTable, LogStatus status ) throws KettleJobException, KettleDatabaseException { boolean cleanLogRecords = st... | Job extends Thread implements VariableSpace, NamedParams, HasLogChannelInterface, LoggingObjectInterface,
ExecutorInterface, ExtensionDataInterface { protected void writeLogTableInformation( JobLogTable jobLogTable, LogStatus status ) throws KettleJobException, KettleDatabaseException { boolean cleanLogRecords = st... | Job extends Thread implements VariableSpace, NamedParams, HasLogChannelInterface, LoggingObjectInterface,
ExecutorInterface, ExtensionDataInterface { protected void writeLogTableInformation( JobLogTable jobLogTable, LogStatus status ) throws KettleJobException, KettleDatabaseException { boolean cleanLogRecords = st... | Job extends Thread implements VariableSpace, NamedParams, HasLogChannelInterface, LoggingObjectInterface,
ExecutorInterface, ExtensionDataInterface { protected void writeLogTableInformation( JobLogTable jobLogTable, LogStatus status ) throws KettleJobException, KettleDatabaseException { boolean cleanLogRecords = st... |
@Test public void testIdIsNullByDefault() { JobEntryBase base = new JobEntryBase(); Assert.assertNull( "Object ID is null by default", base.getObjectId() ); } | @Override public ObjectId getObjectId() { return id; } | JobEntryBase implements Cloneable, VariableSpace, CheckResultSourceInterface,
ResourceHolderInterface, LoggingObjectInterface, AttributesInterface, ExtensionDataInterface { @Override public ObjectId getObjectId() { return id; } } | JobEntryBase implements Cloneable, VariableSpace, CheckResultSourceInterface,
ResourceHolderInterface, LoggingObjectInterface, AttributesInterface, ExtensionDataInterface { @Override public ObjectId getObjectId() { return id; } JobEntryBase(); JobEntryBase( String name, String description ); } | JobEntryBase implements Cloneable, VariableSpace, CheckResultSourceInterface,
ResourceHolderInterface, LoggingObjectInterface, AttributesInterface, ExtensionDataInterface { @Override public ObjectId getObjectId() { return id; } JobEntryBase(); JobEntryBase( String name, String description ); @Override boolean equals... | JobEntryBase implements Cloneable, VariableSpace, CheckResultSourceInterface,
ResourceHolderInterface, LoggingObjectInterface, AttributesInterface, ExtensionDataInterface { @Override public ObjectId getObjectId() { return id; } JobEntryBase(); JobEntryBase( String name, String description ); @Override boolean equals... |
@Test public void testConnectRepository() throws KettleException { JobExecutionConfiguration jobExecutionConfiguration = new JobExecutionConfiguration(); final RepositoriesMeta repositoriesMeta = mock( RepositoriesMeta.class ); final RepositoryMeta repositoryMeta = mock( RepositoryMeta.class ); final Repository reposit... | public Repository connectRepository( String repositoryName, String username, String password ) throws KettleException { RepositoriesMeta repositoriesMeta = new RepositoriesMeta(); repositoriesMeta.getLog().setLogLevel( log.getLogLevel() ); try { repositoriesMeta.readData(); } catch ( Exception e ) { throw new KettleExc... | JobExecutionConfiguration implements ExecutionConfiguration { public Repository connectRepository( String repositoryName, String username, String password ) throws KettleException { RepositoriesMeta repositoriesMeta = new RepositoriesMeta(); repositoriesMeta.getLog().setLogLevel( log.getLogLevel() ); try { repositories... | JobExecutionConfiguration implements ExecutionConfiguration { public Repository connectRepository( String repositoryName, String username, String password ) throws KettleException { RepositoriesMeta repositoriesMeta = new RepositoriesMeta(); repositoriesMeta.getLog().setLogLevel( log.getLogLevel() ); try { repositories... | JobExecutionConfiguration implements ExecutionConfiguration { public Repository connectRepository( String repositoryName, String username, String password ) throws KettleException { RepositoriesMeta repositoriesMeta = new RepositoriesMeta(); repositoriesMeta.getLog().setLogLevel( log.getLogLevel() ); try { repositories... | JobExecutionConfiguration implements ExecutionConfiguration { public Repository connectRepository( String repositoryName, String username, String password ) throws KettleException { RepositoriesMeta repositoriesMeta = new RepositoriesMeta(); repositoriesMeta.getLog().setLogLevel( log.getLogLevel() ); try { repositories... |
@Test public void testDefaultPassedBatchId() { JobExecutionConfiguration jec = new JobExecutionConfiguration(); assertEquals( "default passedBatchId value must be null", null, jec.getPassedBatchId() ); } | public Long getPassedBatchId() { return passedBatchId; } | JobExecutionConfiguration implements ExecutionConfiguration { public Long getPassedBatchId() { return passedBatchId; } } | JobExecutionConfiguration implements ExecutionConfiguration { public Long getPassedBatchId() { return passedBatchId; } JobExecutionConfiguration(); JobExecutionConfiguration( Node trecNode ); } | JobExecutionConfiguration implements ExecutionConfiguration { public Long getPassedBatchId() { return passedBatchId; } JobExecutionConfiguration(); JobExecutionConfiguration( Node trecNode ); Object clone(); Map<String, String> getArguments(); void setArguments( Map<String, String> arguments ); void setParams( Map<Str... | JobExecutionConfiguration implements ExecutionConfiguration { public Long getPassedBatchId() { return passedBatchId; } JobExecutionConfiguration(); JobExecutionConfiguration( Node trecNode ); Object clone(); Map<String, String> getArguments(); void setArguments( Map<String, String> arguments ); void setParams( Map<Str... |
@Test public void testGetUsedArguments() throws KettleException { JobExecutionConfiguration executionConfiguration = new JobExecutionConfiguration(); JobMeta jobMeta = new JobMeta( ); jobMeta.jobcopies = new ArrayList<>( ); String[] commandLineArguments = new String[ 0 ]; IMetaStore metaStore = mock( IMetaStore.class )... | public void getUsedArguments( JobMeta jobMeta, String[] commandLineArguments, IMetaStore metaStore ) { for ( JobEntryCopy jobEntryCopy : jobMeta.jobcopies ) { if ( jobEntryCopy.isTransformation() ) { JobEntryTrans jobEntryTrans = (JobEntryTrans) jobEntryCopy.getEntry(); try { TransMeta transMeta = jobEntryTrans.getTran... | JobExecutionConfiguration implements ExecutionConfiguration { public void getUsedArguments( JobMeta jobMeta, String[] commandLineArguments, IMetaStore metaStore ) { for ( JobEntryCopy jobEntryCopy : jobMeta.jobcopies ) { if ( jobEntryCopy.isTransformation() ) { JobEntryTrans jobEntryTrans = (JobEntryTrans) jobEntryCopy... | JobExecutionConfiguration implements ExecutionConfiguration { public void getUsedArguments( JobMeta jobMeta, String[] commandLineArguments, IMetaStore metaStore ) { for ( JobEntryCopy jobEntryCopy : jobMeta.jobcopies ) { if ( jobEntryCopy.isTransformation() ) { JobEntryTrans jobEntryTrans = (JobEntryTrans) jobEntryCopy... | JobExecutionConfiguration implements ExecutionConfiguration { public void getUsedArguments( JobMeta jobMeta, String[] commandLineArguments, IMetaStore metaStore ) { for ( JobEntryCopy jobEntryCopy : jobMeta.jobcopies ) { if ( jobEntryCopy.isTransformation() ) { JobEntryTrans jobEntryTrans = (JobEntryTrans) jobEntryCopy... | JobExecutionConfiguration implements ExecutionConfiguration { public void getUsedArguments( JobMeta jobMeta, String[] commandLineArguments, IMetaStore metaStore ) { for ( JobEntryCopy jobEntryCopy : jobMeta.jobcopies ) { if ( jobEntryCopy.isTransformation() ) { JobEntryTrans jobEntryTrans = (JobEntryTrans) jobEntryCopy... |
@Test public void testParseJettyOption_AllOptions() throws KettleXMLException { Node configNode = getConfigNode( getConfigWithAllOptions() ); Map<String, String> parseJettyOptions = slServerConfig.parseJettyOptions( configNode ); assertNotNull( parseJettyOptions ); assertEquals( 3, parseJettyOptions.size() ); assertTru... | protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOptionsNode, XML_TAG_ACC... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... | SlaveServerConfig { protected Map<String, String> parseJettyOptions( Node node ) { Map<String, String> jettyOptions = null; Node jettyOptionsNode = XMLHandler.getSubNode( node, XML_TAG_JETTY_OPTIONS ); if ( jettyOptionsNode != null ) { jettyOptions = new HashMap<String, String>(); if ( XMLHandler.getTagValue( jettyOpti... |
@Test public void replaceWinEOLtest() { String content = "#!/bin/bash\r\n" + "\r\n" + "echo `date` > /home/pentaho/test_output/output.txt"; doCallRealMethod().when( jobEntryShellMock ).replaceWinEOL( anyString() ); content = jobEntryShellMock.replaceWinEOL( content ); verify( jobEntryShellMock ).replaceWinEOL( anyStrin... | @VisibleForTesting String replaceWinEOL( String input ) { String result = input; result = result.replaceAll( "\\r\\n?", "\n" ); return result; } | JobEntryShell extends JobEntryBase implements Cloneable, JobEntryInterface { @VisibleForTesting String replaceWinEOL( String input ) { String result = input; result = result.replaceAll( "\\r\\n?", "\n" ); return result; } } | JobEntryShell extends JobEntryBase implements Cloneable, JobEntryInterface { @VisibleForTesting String replaceWinEOL( String input ) { String result = input; result = result.replaceAll( "\\r\\n?", "\n" ); return result; } JobEntryShell( String name ); JobEntryShell(); } | JobEntryShell extends JobEntryBase implements Cloneable, JobEntryInterface { @VisibleForTesting String replaceWinEOL( String input ) { String result = input; result = result.replaceAll( "\\r\\n?", "\n" ); return result; } JobEntryShell( String name ); JobEntryShell(); void allocate( int nrFields ); Object clone(); Str... | JobEntryShell extends JobEntryBase implements Cloneable, JobEntryInterface { @VisibleForTesting String replaceWinEOL( String input ) { String result = input; result = result.replaceAll( "\\r\\n?", "\n" ); return result; } JobEntryShell( String name ); JobEntryShell(); void allocate( int nrFields ); Object clone(); Str... |
@Test public void testFetchOneFolderModePop3() throws KettleException, MessagingException { entry.fetchOneFolder( mailConn, true, "junitImapFolder", "junitRealOutputFolder", "junitTargetAttachmentFolder", "junitRealMoveToIMAPFolder", "junitRealFilenamePattern", 0, Mockito.mock( SimpleDateFormat.class ) ); Mockito.verif... | void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ) throws KettleException { try { if ( !usePOP3 && !Utils.isEmpty( realIMAPFold... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... |
@Test public void testFetchOneFolderModeIMAPWithNonDefFolder() throws KettleException, MessagingException { entry.fetchOneFolder( mailConn, false, "junitImapFolder", "junitRealOutputFolder", "junitTargetAttachmentFolder", "junitRealMoveToIMAPFolder", "junitRealFilenamePattern", 0, Mockito.mock( SimpleDateFormat.class )... | void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ) throws KettleException { try { if ( !usePOP3 && !Utils.isEmpty( realIMAPFold... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... |
@Test public void testFetchOneFolderModeIMAPWithIsDefFolder() throws KettleException, MessagingException { entry.fetchOneFolder( mailConn, false, null, "junitRealOutputFolder", "junitTargetAttachmentFolder", "junitRealMoveToIMAPFolder", "junitRealFilenamePattern", 0, Mockito.mock( SimpleDateFormat.class ) ); Mockito.ve... | void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ) throws KettleException { try { if ( !usePOP3 && !Utils.isEmpty( realIMAPFold... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... | JobEntryGetPOP extends JobEntryBase implements Cloneable, JobEntryInterface { void fetchOneFolder( MailConnection mailConn, boolean usePOP3, String realIMAPFolder, String realOutputFolder, String targetAttachmentFolder, String realMoveToIMAPFolder, String realFilenamePattern, int nbrmailtoretrieve, SimpleDateFormat df ... |
@Test public void openFolderTest() throws KettleException, MessagingException { conn.openFolder( "a/b", false, false ); Folder folder = conn.getFolder(); Assert.assertEquals( "Folder B is opened", "B", folder.getFullName() ); } | public void openFolder( boolean write ) throws KettleException { openFolder( null, true, write ); } | MailConnection { public void openFolder( boolean write ) throws KettleException { openFolder( null, true, write ); } } | MailConnection { public void openFolder( boolean write ) throws KettleException { openFolder( null, true, write ); } MailConnection( LogChannelInterface log, int protocol, String server, int port, String username,
String password, boolean usessl, boolean useproxy, String proxyusername ); } | MailConnection { public void openFolder( boolean write ) throws KettleException { openFolder( null, true, write ); } MailConnection( LogChannelInterface log, int protocol, String server, int port, String username,
String password, boolean usessl, boolean useproxy, String proxyusername ); boolean isConnected(); bool... | MailConnection { public void openFolder( boolean write ) throws KettleException { openFolder( null, true, write ); } MailConnection( LogChannelInterface log, int protocol, String server, int port, String username,
String password, boolean usessl, boolean useproxy, String proxyusername ); boolean isConnected(); bool... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.