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 testIsQueryInputProcessorUseCache() throws Exception { boolean defaultValue = MidaoConfig.isQueryInputProcessorUseCache(); MidaoConfig.setQueryInputProcessorUseCache(!defaultValue); Assert.assertEquals(!defaultValue, MidaoConfig.isQueryInputProcessorUseCache()); MidaoConfig.setQueryInputProcessorUseCa... | public static boolean isQueryInputProcessorUseCache() { return MjdbcConfig.isQueryInputProcessorUseCache(); } | MidaoConfig { public static boolean isQueryInputProcessorUseCache() { return MjdbcConfig.isQueryInputProcessorUseCache(); } } | MidaoConfig { public static boolean isQueryInputProcessorUseCache() { return MjdbcConfig.isQueryInputProcessorUseCache(); } } | MidaoConfig { public static boolean isQueryInputProcessorUseCache() { return MjdbcConfig.isQueryInputProcessorUseCache(); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache... | MidaoConfig { public static boolean isQueryInputProcessorUseCache() { return MjdbcConfig.isQueryInputProcessorUseCache(); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache... |
@Test public void testGetDefaultQueryOutputProcessor() throws Exception { Assert.assertEquals(true, MidaoConfig.getDefaultQueryOutputProcessor() instanceof QueryOutputProcessor); } | public static QueryOutputProcessor getDefaultQueryOutputProcessor() { return MjdbcConfig.getDefaultQueryOutputProcessor(); } | MidaoConfig { public static QueryOutputProcessor getDefaultQueryOutputProcessor() { return MjdbcConfig.getDefaultQueryOutputProcessor(); } } | MidaoConfig { public static QueryOutputProcessor getDefaultQueryOutputProcessor() { return MjdbcConfig.getDefaultQueryOutputProcessor(); } } | MidaoConfig { public static QueryOutputProcessor getDefaultQueryOutputProcessor() { return MjdbcConfig.getDefaultQueryOutputProcessor(); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputPr... | MidaoConfig { public static QueryOutputProcessor getDefaultQueryOutputProcessor() { return MjdbcConfig.getDefaultQueryOutputProcessor(); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputPr... |
@Test public void testGetDefaultQueryInputProcessor() throws Exception { Assert.assertEquals(true, MjdbcConfig.getDefaultQueryInputProcessor() instanceof QueryInputProcessor); } | public static QueryInputProcessor getDefaultQueryInputProcessor() { return instance().defaultQueryInputProcessor; } | MjdbcConfig { public static QueryInputProcessor getDefaultQueryInputProcessor() { return instance().defaultQueryInputProcessor; } } | MjdbcConfig { public static QueryInputProcessor getDefaultQueryInputProcessor() { return instance().defaultQueryInputProcessor; } } | MjdbcConfig { public static QueryInputProcessor getDefaultQueryInputProcessor() { return instance().defaultQueryInputProcessor; } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUs... | MjdbcConfig { public static QueryInputProcessor getDefaultQueryInputProcessor() { return instance().defaultQueryInputProcessor; } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUs... |
@Test public void testGetDefaultStatementHandler() throws Exception { Assert.assertEquals(true, MidaoConfig.getDefaultStatementHandler(overrider) instanceof StatementHandler); } | public static StatementHandler getDefaultStatementHandler(Overrider overrider) { return MjdbcConfig.getDefaultStatementHandler(overrider); } | MidaoConfig { public static StatementHandler getDefaultStatementHandler(Overrider overrider) { return MjdbcConfig.getDefaultStatementHandler(overrider); } } | MidaoConfig { public static StatementHandler getDefaultStatementHandler(Overrider overrider) { return MjdbcConfig.getDefaultStatementHandler(overrider); } } | MidaoConfig { public static StatementHandler getDefaultStatementHandler(Overrider overrider) { return MjdbcConfig.getDefaultStatementHandler(overrider); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolea... | MidaoConfig { public static StatementHandler getDefaultStatementHandler(Overrider overrider) { return MjdbcConfig.getDefaultStatementHandler(overrider); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolea... |
@Test public void testGetDefaultTypeHandler() throws Exception { Assert.assertEquals(true, MidaoConfig.getDefaultTypeHandler(overrider) instanceof TypeHandler); } | public static TypeHandler getDefaultTypeHandler(Overrider overrider) { return MjdbcConfig.getDefaultTypeHandler(overrider); } | MidaoConfig { public static TypeHandler getDefaultTypeHandler(Overrider overrider) { return MjdbcConfig.getDefaultTypeHandler(overrider); } } | MidaoConfig { public static TypeHandler getDefaultTypeHandler(Overrider overrider) { return MjdbcConfig.getDefaultTypeHandler(overrider); } } | MidaoConfig { public static TypeHandler getDefaultTypeHandler(Overrider overrider) { return MjdbcConfig.getDefaultTypeHandler(overrider); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputP... | MidaoConfig { public static TypeHandler getDefaultTypeHandler(Overrider overrider) { return MjdbcConfig.getDefaultTypeHandler(overrider); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputP... |
@Test public void testGetDefaultTransactionHandlerConn() throws Exception { Assert.assertEquals(true, MidaoConfig.getDefaultTransactionHandler(conn) instanceof TransactionHandler); } | public static TransactionHandler getDefaultTransactionHandler(Connection conn) { return MjdbcConfig.getDefaultTransactionHandler(conn); } | MidaoConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { return MjdbcConfig.getDefaultTransactionHandler(conn); } } | MidaoConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { return MjdbcConfig.getDefaultTransactionHandler(conn); } } | MidaoConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { return MjdbcConfig.getDefaultTransactionHandler(conn); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean i... | MidaoConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { return MjdbcConfig.getDefaultTransactionHandler(conn); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean i... |
@Test public void testGetDefaultTransactionHandlerDataSource() throws Exception { Assert.assertEquals(true, MidaoConfig.getDefaultTransactionHandler(ds) instanceof TransactionHandler); } | public static TransactionHandler getDefaultTransactionHandler(Connection conn) { return MjdbcConfig.getDefaultTransactionHandler(conn); } | MidaoConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { return MjdbcConfig.getDefaultTransactionHandler(conn); } } | MidaoConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { return MjdbcConfig.getDefaultTransactionHandler(conn); } } | MidaoConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { return MjdbcConfig.getDefaultTransactionHandler(conn); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean i... | MidaoConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { return MjdbcConfig.getDefaultTransactionHandler(conn); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean i... |
@Test public void testGetDefaultExceptionHandler() throws Exception { Assert.assertEquals(true, MidaoConfig.getDefaultExceptionHandler("") instanceof ExceptionHandler); } | public static ExceptionHandler getDefaultExceptionHandler(String dbName) { return MjdbcConfig.getDefaultExceptionHandler(dbName); } | MidaoConfig { public static ExceptionHandler getDefaultExceptionHandler(String dbName) { return MjdbcConfig.getDefaultExceptionHandler(dbName); } } | MidaoConfig { public static ExceptionHandler getDefaultExceptionHandler(String dbName) { return MjdbcConfig.getDefaultExceptionHandler(dbName); } } | MidaoConfig { public static ExceptionHandler getDefaultExceptionHandler(String dbName) { return MjdbcConfig.getDefaultExceptionHandler(dbName); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQuery... | MidaoConfig { public static ExceptionHandler getDefaultExceptionHandler(String dbName) { return MjdbcConfig.getDefaultExceptionHandler(dbName); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQuery... |
@Test public void testGetDefaultMetadataHandlerConn() throws Exception { Assert.assertEquals(true, MidaoConfig.getDefaultMetadataHandler(conn) instanceof MetadataHandler); } | public static MetadataHandler getDefaultMetadataHandler(Connection conn) { return MjdbcConfig.getDefaultMetadataHandler(conn); } | MidaoConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { return MjdbcConfig.getDefaultMetadataHandler(conn); } } | MidaoConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { return MjdbcConfig.getDefaultMetadataHandler(conn); } } | MidaoConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { return MjdbcConfig.getDefaultMetadataHandler(conn); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInp... | MidaoConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { return MjdbcConfig.getDefaultMetadataHandler(conn); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInp... |
@Test public void testGetDefaultMetadataHandlerDataSource() throws Exception { Assert.assertEquals(true, MidaoConfig.getDefaultMetadataHandler(ds) instanceof MetadataHandler); } | public static MetadataHandler getDefaultMetadataHandler(Connection conn) { return MjdbcConfig.getDefaultMetadataHandler(conn); } | MidaoConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { return MjdbcConfig.getDefaultMetadataHandler(conn); } } | MidaoConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { return MjdbcConfig.getDefaultMetadataHandler(conn); } } | MidaoConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { return MjdbcConfig.getDefaultMetadataHandler(conn); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInp... | MidaoConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { return MjdbcConfig.getDefaultMetadataHandler(conn); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInp... |
@Test public void testGetDefaultOverrider() throws Exception { Assert.assertEquals(true, MidaoConfig.getDefaultOverrider() instanceof Overrider); } | public static Overrider getDefaultOverrider() { return MjdbcConfig.getDefaultOverrider(); } | MidaoConfig { public static Overrider getDefaultOverrider() { return MjdbcConfig.getDefaultOverrider(); } } | MidaoConfig { public static Overrider getDefaultOverrider() { return MjdbcConfig.getDefaultOverrider(); } } | MidaoConfig { public static Overrider getDefaultOverrider() { return MjdbcConfig.getDefaultOverrider(); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); static void se... | MidaoConfig { public static Overrider getDefaultOverrider() { return MjdbcConfig.getDefaultOverrider(); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); static void se... |
@Test public void testIsProfilerEnabled() throws Exception { boolean defaultValue = MidaoConfig.isProfilerEnabled(); MidaoConfig.setProfilerEnabled(!defaultValue); Assert.assertEquals(!defaultValue, MidaoConfig.isProfilerEnabled()); MidaoConfig.setProfilerEnabled(defaultValue); } | public static boolean isProfilerEnabled() { return MjdbcConfig.isProfilerEnabled(); } | MidaoConfig { public static boolean isProfilerEnabled() { return MjdbcConfig.isProfilerEnabled(); } } | MidaoConfig { public static boolean isProfilerEnabled() { return MjdbcConfig.isProfilerEnabled(); } } | MidaoConfig { public static boolean isProfilerEnabled() { return MjdbcConfig.isProfilerEnabled(); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); static void setQuery... | MidaoConfig { public static boolean isProfilerEnabled() { return MjdbcConfig.isProfilerEnabled(); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); static void setQuery... |
@Test public void testGetProfilerOutputFormat() throws Exception { Assert.assertEquals(true, MidaoConfig.getProfilerOutputFormat() != null && MidaoConfig.getProfilerOutputFormat().length() > 0); } | public static String getProfilerOutputFormat() { return MjdbcConfig.getProfilerOutputFormat(); } | MidaoConfig { public static String getProfilerOutputFormat() { return MjdbcConfig.getProfilerOutputFormat(); } } | MidaoConfig { public static String getProfilerOutputFormat() { return MjdbcConfig.getProfilerOutputFormat(); } } | MidaoConfig { public static String getProfilerOutputFormat() { return MjdbcConfig.getProfilerOutputFormat(); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); static vo... | MidaoConfig { public static String getProfilerOutputFormat() { return MjdbcConfig.getProfilerOutputFormat(); } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); static vo... |
@Test public void testIsQueryInputProcessorUseCache() throws Exception { boolean defaultValue = MjdbcConfig.isQueryInputProcessorUseCache(); MjdbcConfig.setQueryInputProcessorUseCache(!defaultValue); Assert.assertEquals(!defaultValue, MjdbcConfig.isQueryInputProcessorUseCache()); MjdbcConfig.setQueryInputProcessorUseCa... | public static boolean isQueryInputProcessorUseCache() { return instance().queryInputProcessorUseCache; } | MjdbcConfig { public static boolean isQueryInputProcessorUseCache() { return instance().queryInputProcessorUseCache; } } | MjdbcConfig { public static boolean isQueryInputProcessorUseCache() { return instance().queryInputProcessorUseCache; } } | MjdbcConfig { public static boolean isQueryInputProcessorUseCache() { return instance().queryInputProcessorUseCache; } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); s... | MjdbcConfig { public static boolean isQueryInputProcessorUseCache() { return instance().queryInputProcessorUseCache; } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); s... |
@Test public void testGetDefaultQueryOutputProcessor() throws Exception { Assert.assertEquals(true, MjdbcConfig.getDefaultQueryOutputProcessor() instanceof QueryOutputProcessor); } | public static QueryOutputProcessor getDefaultQueryOutputProcessor() { return instance().defaultQueryOutputProcessor; } | MjdbcConfig { public static QueryOutputProcessor getDefaultQueryOutputProcessor() { return instance().defaultQueryOutputProcessor; } } | MjdbcConfig { public static QueryOutputProcessor getDefaultQueryOutputProcessor() { return instance().defaultQueryOutputProcessor; } } | MjdbcConfig { public static QueryOutputProcessor getDefaultQueryOutputProcessor() { return instance().defaultQueryOutputProcessor; } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcesso... | MjdbcConfig { public static QueryOutputProcessor getDefaultQueryOutputProcessor() { return instance().defaultQueryOutputProcessor; } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcesso... |
@Test public void testGetQueryRunnerConnectionTypeHandler() throws Exception { Assert.assertEquals(true, MidaoFactory.getQueryRunner(conn, EmptyTypeHandler.class) instanceof QueryRunner); } | public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } | MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } } | MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } } | MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } static QueryRunnerService getQueryRunner(DataSource ds); static QueryRunnerService getQueryRunner(DataSource ds, Class<? extends TypeHandler> typeHandlerClazz)... | MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } static QueryRunnerService getQueryRunner(DataSource ds); static QueryRunnerService getQueryRunner(DataSource ds, Class<? extends TypeHandler> typeHandlerClazz)... |
@Test public void testGetDefaultStatementHandler() throws Exception { Assert.assertEquals(true, MjdbcConfig.getDefaultStatementHandler(overrider) instanceof StatementHandler); } | public static StatementHandler getDefaultStatementHandler(Overrider overrider) { StatementHandler result = null; Constructor<? extends StatementHandler> constructor = null; Class<? extends StatementHandler> clazz = instance().defaultStatementHandler; try { constructor = clazz.getConstructor(Overrider.class); result = c... | MjdbcConfig { public static StatementHandler getDefaultStatementHandler(Overrider overrider) { StatementHandler result = null; Constructor<? extends StatementHandler> constructor = null; Class<? extends StatementHandler> clazz = instance().defaultStatementHandler; try { constructor = clazz.getConstructor(Overrider.clas... | MjdbcConfig { public static StatementHandler getDefaultStatementHandler(Overrider overrider) { StatementHandler result = null; Constructor<? extends StatementHandler> constructor = null; Class<? extends StatementHandler> clazz = instance().defaultStatementHandler; try { constructor = clazz.getConstructor(Overrider.clas... | MjdbcConfig { public static StatementHandler getDefaultStatementHandler(Overrider overrider) { StatementHandler result = null; Constructor<? extends StatementHandler> constructor = null; Class<? extends StatementHandler> clazz = instance().defaultStatementHandler; try { constructor = clazz.getConstructor(Overrider.clas... | MjdbcConfig { public static StatementHandler getDefaultStatementHandler(Overrider overrider) { StatementHandler result = null; Constructor<? extends StatementHandler> constructor = null; Class<? extends StatementHandler> clazz = instance().defaultStatementHandler; try { constructor = clazz.getConstructor(Overrider.clas... |
@Test public void testGetDefaultTypeHandler() throws Exception { Assert.assertEquals(true, MjdbcConfig.getDefaultTypeHandler(overrider) instanceof TypeHandler); } | public static TypeHandler getDefaultTypeHandler(Overrider overrider) { TypeHandler result = null; Constructor<? extends TypeHandler> constructor = null; Class<? extends TypeHandler> clazz = instance().defaultTypeHandler; try { constructor = clazz.getConstructor(Overrider.class); result = constructor.newInstance(overrid... | MjdbcConfig { public static TypeHandler getDefaultTypeHandler(Overrider overrider) { TypeHandler result = null; Constructor<? extends TypeHandler> constructor = null; Class<? extends TypeHandler> clazz = instance().defaultTypeHandler; try { constructor = clazz.getConstructor(Overrider.class); result = constructor.newIn... | MjdbcConfig { public static TypeHandler getDefaultTypeHandler(Overrider overrider) { TypeHandler result = null; Constructor<? extends TypeHandler> constructor = null; Class<? extends TypeHandler> clazz = instance().defaultTypeHandler; try { constructor = clazz.getConstructor(Overrider.class); result = constructor.newIn... | MjdbcConfig { public static TypeHandler getDefaultTypeHandler(Overrider overrider) { TypeHandler result = null; Constructor<? extends TypeHandler> constructor = null; Class<? extends TypeHandler> clazz = instance().defaultTypeHandler; try { constructor = clazz.getConstructor(Overrider.class); result = constructor.newIn... | MjdbcConfig { public static TypeHandler getDefaultTypeHandler(Overrider overrider) { TypeHandler result = null; Constructor<? extends TypeHandler> constructor = null; Class<? extends TypeHandler> clazz = instance().defaultTypeHandler; try { constructor = clazz.getConstructor(Overrider.class); result = constructor.newIn... |
@Test public void testGetDefaultTransactionHandlerConn() throws Exception { Assert.assertEquals(true, MjdbcConfig.getDefaultTransactionHandler(conn) instanceof TransactionHandler); } | public static TransactionHandler getDefaultTransactionHandler(Connection conn) { TransactionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultTransactionHandler; try { constructor = clazz.getConstructor(Connection.class); result = (TransactionHandler) constructor.newInstance(c... | MjdbcConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { TransactionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultTransactionHandler; try { constructor = clazz.getConstructor(Connection.class); result = (TransactionHandler) constructor... | MjdbcConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { TransactionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultTransactionHandler; try { constructor = clazz.getConstructor(Connection.class); result = (TransactionHandler) constructor... | MjdbcConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { TransactionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultTransactionHandler; try { constructor = clazz.getConstructor(Connection.class); result = (TransactionHandler) constructor... | MjdbcConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { TransactionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultTransactionHandler; try { constructor = clazz.getConstructor(Connection.class); result = (TransactionHandler) constructor... |
@Test public void testGetDefaultTransactionHandlerDataSource() throws Exception { Assert.assertEquals(true, MjdbcConfig.getDefaultTransactionHandler(ds) instanceof TransactionHandler); } | public static TransactionHandler getDefaultTransactionHandler(Connection conn) { TransactionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultTransactionHandler; try { constructor = clazz.getConstructor(Connection.class); result = (TransactionHandler) constructor.newInstance(c... | MjdbcConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { TransactionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultTransactionHandler; try { constructor = clazz.getConstructor(Connection.class); result = (TransactionHandler) constructor... | MjdbcConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { TransactionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultTransactionHandler; try { constructor = clazz.getConstructor(Connection.class); result = (TransactionHandler) constructor... | MjdbcConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { TransactionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultTransactionHandler; try { constructor = clazz.getConstructor(Connection.class); result = (TransactionHandler) constructor... | MjdbcConfig { public static TransactionHandler getDefaultTransactionHandler(Connection conn) { TransactionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultTransactionHandler; try { constructor = clazz.getConstructor(Connection.class); result = (TransactionHandler) constructor... |
@Test public void testGetDefaultExceptionHandler() throws Exception { Assert.assertEquals(true, MjdbcConfig.getDefaultExceptionHandler("") instanceof ExceptionHandler); } | public static ExceptionHandler getDefaultExceptionHandler(String dbName) { ExceptionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultExceptionHandler; try { constructor = clazz.getConstructor(String.class); result = (ExceptionHandler) constructor.newInstance(dbName); } catch ... | MjdbcConfig { public static ExceptionHandler getDefaultExceptionHandler(String dbName) { ExceptionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultExceptionHandler; try { constructor = clazz.getConstructor(String.class); result = (ExceptionHandler) constructor.newInstance(dbN... | MjdbcConfig { public static ExceptionHandler getDefaultExceptionHandler(String dbName) { ExceptionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultExceptionHandler; try { constructor = clazz.getConstructor(String.class); result = (ExceptionHandler) constructor.newInstance(dbN... | MjdbcConfig { public static ExceptionHandler getDefaultExceptionHandler(String dbName) { ExceptionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultExceptionHandler; try { constructor = clazz.getConstructor(String.class); result = (ExceptionHandler) constructor.newInstance(dbN... | MjdbcConfig { public static ExceptionHandler getDefaultExceptionHandler(String dbName) { ExceptionHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultExceptionHandler; try { constructor = clazz.getConstructor(String.class); result = (ExceptionHandler) constructor.newInstance(dbN... |
@Test public void testGetDefaultMetadataHandlerConn() throws Exception { Assert.assertEquals(true, MjdbcConfig.getDefaultMetadataHandler(conn) instanceof MetadataHandler); } | public static MetadataHandler getDefaultMetadataHandler(Connection conn) { MetadataHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultMetadataHandler; try { constructor = clazz.getConstructor(Connection.class, boolean.class); result = (MetadataHandler) constructor.newInstance(c... | MjdbcConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { MetadataHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultMetadataHandler; try { constructor = clazz.getConstructor(Connection.class, boolean.class); result = (MetadataHandler) constructor... | MjdbcConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { MetadataHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultMetadataHandler; try { constructor = clazz.getConstructor(Connection.class, boolean.class); result = (MetadataHandler) constructor... | MjdbcConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { MetadataHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultMetadataHandler; try { constructor = clazz.getConstructor(Connection.class, boolean.class); result = (MetadataHandler) constructor... | MjdbcConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { MetadataHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultMetadataHandler; try { constructor = clazz.getConstructor(Connection.class, boolean.class); result = (MetadataHandler) constructor... |
@Test public void testGetDefaultMetadataHandlerDataSource() throws Exception { Assert.assertEquals(true, MjdbcConfig.getDefaultMetadataHandler(ds) instanceof MetadataHandler); } | public static MetadataHandler getDefaultMetadataHandler(Connection conn) { MetadataHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultMetadataHandler; try { constructor = clazz.getConstructor(Connection.class, boolean.class); result = (MetadataHandler) constructor.newInstance(c... | MjdbcConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { MetadataHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultMetadataHandler; try { constructor = clazz.getConstructor(Connection.class, boolean.class); result = (MetadataHandler) constructor... | MjdbcConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { MetadataHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultMetadataHandler; try { constructor = clazz.getConstructor(Connection.class, boolean.class); result = (MetadataHandler) constructor... | MjdbcConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { MetadataHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultMetadataHandler; try { constructor = clazz.getConstructor(Connection.class, boolean.class); result = (MetadataHandler) constructor... | MjdbcConfig { public static MetadataHandler getDefaultMetadataHandler(Connection conn) { MetadataHandler result = null; Constructor<?> constructor = null; Class<?> clazz = instance().defaultMetadataHandler; try { constructor = clazz.getConstructor(Connection.class, boolean.class); result = (MetadataHandler) constructor... |
@Test public void testGetDefaultOverrider() throws Exception { Assert.assertEquals(true, MjdbcConfig.getDefaultOverrider() instanceof Overrider); } | public static Overrider getDefaultOverrider() { Overrider result = null; Class<Overrider> clazz = instance().defaultOverrider; try { result = clazz.newInstance(); } catch (InstantiationException e) { throw new MjdbcRuntimeException(ERROR_OR_INIT_FAILED, e); } catch (IllegalAccessException e) { throw new MjdbcRuntimeExc... | MjdbcConfig { public static Overrider getDefaultOverrider() { Overrider result = null; Class<Overrider> clazz = instance().defaultOverrider; try { result = clazz.newInstance(); } catch (InstantiationException e) { throw new MjdbcRuntimeException(ERROR_OR_INIT_FAILED, e); } catch (IllegalAccessException e) { throw new M... | MjdbcConfig { public static Overrider getDefaultOverrider() { Overrider result = null; Class<Overrider> clazz = instance().defaultOverrider; try { result = clazz.newInstance(); } catch (InstantiationException e) { throw new MjdbcRuntimeException(ERROR_OR_INIT_FAILED, e); } catch (IllegalAccessException e) { throw new M... | MjdbcConfig { public static Overrider getDefaultOverrider() { Overrider result = null; Class<Overrider> clazz = instance().defaultOverrider; try { result = clazz.newInstance(); } catch (InstantiationException e) { throw new MjdbcRuntimeException(ERROR_OR_INIT_FAILED, e); } catch (IllegalAccessException e) { throw new M... | MjdbcConfig { public static Overrider getDefaultOverrider() { Overrider result = null; Class<Overrider> clazz = instance().defaultOverrider; try { result = clazz.newInstance(); } catch (InstantiationException e) { throw new MjdbcRuntimeException(ERROR_OR_INIT_FAILED, e); } catch (IllegalAccessException e) { throw new M... |
@Test public void testIsProfilerEnabled() throws Exception { boolean defaultValue = MjdbcConfig.isProfilerEnabled(); MjdbcConfig.setProfilerEnabled(!defaultValue); Assert.assertEquals(!defaultValue, MjdbcConfig.isProfilerEnabled()); MjdbcConfig.setProfilerEnabled(defaultValue); } | public static boolean isProfilerEnabled() { return instance().profilerEnabled; } | MjdbcConfig { public static boolean isProfilerEnabled() { return instance().profilerEnabled; } } | MjdbcConfig { public static boolean isProfilerEnabled() { return instance().profilerEnabled; } } | MjdbcConfig { public static boolean isProfilerEnabled() { return instance().profilerEnabled; } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); static void setQueryInput... | MjdbcConfig { public static boolean isProfilerEnabled() { return instance().profilerEnabled; } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); static void setQueryInput... |
@Test public void testGetProfilerOutputFormat() throws Exception { Assert.assertEquals(true, MjdbcConfig.getProfilerOutputFormat() != null && MjdbcConfig.getProfilerOutputFormat().length() > 0); } | public static String getProfilerOutputFormat() { return instance().profilerOutputFormat; } | MjdbcConfig { public static String getProfilerOutputFormat() { return instance().profilerOutputFormat; } } | MjdbcConfig { public static String getProfilerOutputFormat() { return instance().profilerOutputFormat; } } | MjdbcConfig { public static String getProfilerOutputFormat() { return instance().profilerOutputFormat; } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); static void set... | MjdbcConfig { public static String getProfilerOutputFormat() { return instance().profilerOutputFormat; } static QueryInputProcessor getDefaultQueryInputProcessor(); static void setDefaultQueryInputProcessor(QueryInputProcessor defaultQueryInputProcessor); static boolean isQueryInputProcessorUseCache(); static void set... |
@Test public void testGetQueryRunnerConnectionTypeStatementHandler() throws Exception { Assert.assertEquals(true, MidaoFactory.getQueryRunner(conn, EmptyTypeHandler.class, BaseStatementHandler.class) instanceof QueryRunner); } | public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } | MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } } | MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } } | MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } static QueryRunnerService getQueryRunner(DataSource ds); static QueryRunnerService getQueryRunner(DataSource ds, Class<? extends TypeHandler> typeHandlerClazz)... | MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } static QueryRunnerService getQueryRunner(DataSource ds); static QueryRunnerService getQueryRunner(DataSource ds, Class<? extends TypeHandler> typeHandlerClazz)... |
@Test public void testGetDocumentStream() throws Exception { Document document = XmlRepositoryFactory.getDocument(new ByteArrayInputStream(xmlQuery.getBytes())); Assert.assertNotNull(document); } | public static Document getDocument(File file) { InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException ex) { throw new MjdbcRuntimeException(ex); } return XmlRepositoryFactory.getDocument(inputStream); } | XmlRepositoryFactory { public static Document getDocument(File file) { InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException ex) { throw new MjdbcRuntimeException(ex); } return XmlRepositoryFactory.getDocument(inputStream); } } | XmlRepositoryFactory { public static Document getDocument(File file) { InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException ex) { throw new MjdbcRuntimeException(ex); } return XmlRepositoryFactory.getDocument(inputStream); } } | XmlRepositoryFactory { public static Document getDocument(File file) { InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException ex) { throw new MjdbcRuntimeException(ex); } return XmlRepositoryFactory.getDocument(inputStream); } static Document getDocument(File file... | XmlRepositoryFactory { public static Document getDocument(File file) { InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException ex) { throw new MjdbcRuntimeException(ex); } return XmlRepositoryFactory.getDocument(inputStream); } static Document getDocument(File file... |
@Test public void testGetDocumentStreamMultiThreadedUsage() throws Exception { final Runnable runnable = new Runnable() { @Override public void run() { XmlRepositoryFactory.getDocument(new ByteArrayInputStream(xmlQuery.getBytes())); } }; for (long i = 0; i < 10; i++) { (new Thread(new Runnable() { @Override public void... | public static Document getDocument(File file) { InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException ex) { throw new MjdbcRuntimeException(ex); } return XmlRepositoryFactory.getDocument(inputStream); } | XmlRepositoryFactory { public static Document getDocument(File file) { InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException ex) { throw new MjdbcRuntimeException(ex); } return XmlRepositoryFactory.getDocument(inputStream); } } | XmlRepositoryFactory { public static Document getDocument(File file) { InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException ex) { throw new MjdbcRuntimeException(ex); } return XmlRepositoryFactory.getDocument(inputStream); } } | XmlRepositoryFactory { public static Document getDocument(File file) { InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException ex) { throw new MjdbcRuntimeException(ex); } return XmlRepositoryFactory.getDocument(inputStream); } static Document getDocument(File file... | XmlRepositoryFactory { public static Document getDocument(File file) { InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException ex) { throw new MjdbcRuntimeException(ex); } return XmlRepositoryFactory.getDocument(inputStream); } static Document getDocument(File file... |
@Test public void testRemove() throws Exception { XmlRepositoryFactory.addAll(XmlRepositoryFactory.getDocument(new ByteArrayInputStream( xmlQuery.getBytes() ))); Assert.assertNotNull(XmlRepositoryFactory.getQueryString("findOne")); XmlRepositoryFactory.remove("findOne"); try { XmlRepositoryFactory.getQueryString("findO... | public static void remove(String name) { xmlQueryString.remove(name); xmlOverrideMap.remove(name); } | XmlRepositoryFactory { public static void remove(String name) { xmlQueryString.remove(name); xmlOverrideMap.remove(name); } } | XmlRepositoryFactory { public static void remove(String name) { xmlQueryString.remove(name); xmlOverrideMap.remove(name); } } | XmlRepositoryFactory { public static void remove(String name) { xmlQueryString.remove(name); xmlOverrideMap.remove(name); } static Document getDocument(File file); static Document getDocument(InputStream inputStream); static void add(Document document, String name); static void add(Element element); static void addAll... | XmlRepositoryFactory { public static void remove(String name) { xmlQueryString.remove(name); xmlOverrideMap.remove(name); } static Document getDocument(File file); static Document getDocument(InputStream inputStream); static void add(Document document, String name); static void add(Element element); static void addAll... |
@Test public void testRefresh() throws Exception { XmlRepositoryFactory.addAll(XmlRepositoryFactory.getDocument(new ByteArrayInputStream( xmlQuery.getBytes() ))); Assert.assertEquals("SELECT ID FROM CATS WHERE AGE=#{age} AND NAME = #{name}", XmlRepositoryFactory.getQueryString("findOne")); Document document = XmlReposi... | public static void refresh(Document document) { refresh(document, document); } | XmlRepositoryFactory { public static void refresh(Document document) { refresh(document, document); } } | XmlRepositoryFactory { public static void refresh(Document document) { refresh(document, document); } } | XmlRepositoryFactory { public static void refresh(Document document) { refresh(document, document); } static Document getDocument(File file); static Document getDocument(InputStream inputStream); static void add(Document document, String name); static void add(Element element); static void addAll(Document document); s... | XmlRepositoryFactory { public static void refresh(Document document) { refresh(document, document); } static Document getDocument(File file); static Document getDocument(InputStream inputStream); static void add(Document document, String name); static void add(Element element); static void addAll(Document document); s... |
@Test public void testIsAutoRefresh() throws Exception { } | public static boolean isAutoRefresh() { return autoRefresh; } | XmlRepositoryFactory { public static boolean isAutoRefresh() { return autoRefresh; } } | XmlRepositoryFactory { public static boolean isAutoRefresh() { return autoRefresh; } } | XmlRepositoryFactory { public static boolean isAutoRefresh() { return autoRefresh; } static Document getDocument(File file); static Document getDocument(InputStream inputStream); static void add(Document document, String name); static void add(Element element); static void addAll(Document document); static void addAll... | XmlRepositoryFactory { public static boolean isAutoRefresh() { return autoRefresh; } static Document getDocument(File file); static Document getDocument(InputStream inputStream); static void add(Document document, String name); static void add(Element element); static void addAll(Document document); static void addAll... |
@Test public void testSetAutoRefresh() throws Exception { } | public static void setAutoRefresh(boolean autoRefresh) { XmlRepositoryFactory.autoRefresh = autoRefresh; } | XmlRepositoryFactory { public static void setAutoRefresh(boolean autoRefresh) { XmlRepositoryFactory.autoRefresh = autoRefresh; } } | XmlRepositoryFactory { public static void setAutoRefresh(boolean autoRefresh) { XmlRepositoryFactory.autoRefresh = autoRefresh; } } | XmlRepositoryFactory { public static void setAutoRefresh(boolean autoRefresh) { XmlRepositoryFactory.autoRefresh = autoRefresh; } static Document getDocument(File file); static Document getDocument(InputStream inputStream); static void add(Document document, String name); static void add(Element element); static void ... | XmlRepositoryFactory { public static void setAutoRefresh(boolean autoRefresh) { XmlRepositoryFactory.autoRefresh = autoRefresh; } static Document getDocument(File file); static Document getDocument(InputStream inputStream); static void add(Document document, String name); static void add(Element element); static void ... |
@Test public void testGetQueryString() throws Exception { XmlRepositoryFactory.addAll(XmlRepositoryFactory.getDocument(new ByteArrayInputStream( xmlQuery.getBytes() ))); Assert.assertNotNull(XmlRepositoryFactory.getQueryString("findOne")); } | static String getQueryString(String name) { String result = null; if (xmlQueryString.containsKey(name) == false) { throw new MjdbcRuntimeException("Failed to find query by name: " + name + ". Please ensure that relevant file was loaded into repository"); } result = xmlQueryString.get(name); return result; } | XmlRepositoryFactory { static String getQueryString(String name) { String result = null; if (xmlQueryString.containsKey(name) == false) { throw new MjdbcRuntimeException("Failed to find query by name: " + name + ". Please ensure that relevant file was loaded into repository"); } result = xmlQueryString.get(name); retur... | XmlRepositoryFactory { static String getQueryString(String name) { String result = null; if (xmlQueryString.containsKey(name) == false) { throw new MjdbcRuntimeException("Failed to find query by name: " + name + ". Please ensure that relevant file was loaded into repository"); } result = xmlQueryString.get(name); retur... | XmlRepositoryFactory { static String getQueryString(String name) { String result = null; if (xmlQueryString.containsKey(name) == false) { throw new MjdbcRuntimeException("Failed to find query by name: " + name + ". Please ensure that relevant file was loaded into repository"); } result = xmlQueryString.get(name); retur... | XmlRepositoryFactory { static String getQueryString(String name) { String result = null; if (xmlQueryString.containsKey(name) == false) { throw new MjdbcRuntimeException("Failed to find query by name: " + name + ". Please ensure that relevant file was loaded into repository"); } result = xmlQueryString.get(name); retur... |
@Test public void testGetOverride() throws Exception { XmlRepositoryFactory.addAll(XmlRepositoryFactory.getDocument(new ByteArrayInputStream( xmlQuery.getBytes() ))); XmlInputOutputHandler handler = new XmlInputOutputHandler("findOne", catMap); Assert.assertNotNull(XmlRepositoryFactory.getOverride(handler)); } | static Overrider getOverride(AbstractXmlInputOutputHandler inputHandler) { AssertUtils.assertNotNull(inputHandler); Overrider result = null; if (xmlOverrideMap.containsKey(inputHandler.getName()) == false) { throw new MjdbcRuntimeException("Failed to find query by name: " + inputHandler.getName() + ". Please ensure tha... | XmlRepositoryFactory { static Overrider getOverride(AbstractXmlInputOutputHandler inputHandler) { AssertUtils.assertNotNull(inputHandler); Overrider result = null; if (xmlOverrideMap.containsKey(inputHandler.getName()) == false) { throw new MjdbcRuntimeException("Failed to find query by name: " + inputHandler.getName()... | XmlRepositoryFactory { static Overrider getOverride(AbstractXmlInputOutputHandler inputHandler) { AssertUtils.assertNotNull(inputHandler); Overrider result = null; if (xmlOverrideMap.containsKey(inputHandler.getName()) == false) { throw new MjdbcRuntimeException("Failed to find query by name: " + inputHandler.getName()... | XmlRepositoryFactory { static Overrider getOverride(AbstractXmlInputOutputHandler inputHandler) { AssertUtils.assertNotNull(inputHandler); Overrider result = null; if (xmlOverrideMap.containsKey(inputHandler.getName()) == false) { throw new MjdbcRuntimeException("Failed to find query by name: " + inputHandler.getName()... | XmlRepositoryFactory { static Overrider getOverride(AbstractXmlInputOutputHandler inputHandler) { AssertUtils.assertNotNull(inputHandler); Overrider result = null; if (xmlOverrideMap.containsKey(inputHandler.getName()) == false) { throw new MjdbcRuntimeException("Failed to find query by name: " + inputHandler.getName()... |
@Test public void testGetOutputHandler() throws Exception { XmlRepositoryFactory.addAll(XmlRepositoryFactory.getDocument(new ByteArrayInputStream( xmlQuery.getBytes() ))); XmlInputOutputHandler handler = new XmlInputOutputHandler("findOne", catMap); Assert.assertNotNull(XmlRepositoryFactory.getOutputHandler(handler)); ... | static OutputHandler getOutputHandler(AbstractXmlInputOutputHandler inputHandler) { AssertUtils.assertNotNull(inputHandler); OutputHandler outputHandler = null; String outputHandlerClassName = (String) getOverride(inputHandler).getOverride(XmlParameters.outputHandler); if (outputHandlerClassName.contains(".") == false)... | XmlRepositoryFactory { static OutputHandler getOutputHandler(AbstractXmlInputOutputHandler inputHandler) { AssertUtils.assertNotNull(inputHandler); OutputHandler outputHandler = null; String outputHandlerClassName = (String) getOverride(inputHandler).getOverride(XmlParameters.outputHandler); if (outputHandlerClassName.... | XmlRepositoryFactory { static OutputHandler getOutputHandler(AbstractXmlInputOutputHandler inputHandler) { AssertUtils.assertNotNull(inputHandler); OutputHandler outputHandler = null; String outputHandlerClassName = (String) getOverride(inputHandler).getOverride(XmlParameters.outputHandler); if (outputHandlerClassName.... | XmlRepositoryFactory { static OutputHandler getOutputHandler(AbstractXmlInputOutputHandler inputHandler) { AssertUtils.assertNotNull(inputHandler); OutputHandler outputHandler = null; String outputHandlerClassName = (String) getOverride(inputHandler).getOverride(XmlParameters.outputHandler); if (outputHandlerClassName.... | XmlRepositoryFactory { static OutputHandler getOutputHandler(AbstractXmlInputOutputHandler inputHandler) { AssertUtils.assertNotNull(inputHandler); OutputHandler outputHandler = null; String outputHandlerClassName = (String) getOverride(inputHandler).getOverride(XmlParameters.outputHandler); if (outputHandlerClassName.... |
@Test public void testSetMaxCacheSize() throws Exception { queryParametersLazyList.get(1); Assert.assertEquals(2, queryParametersLazyList.sizeCached()); queryParametersLazyList.setMaxCacheSize(1); queryParametersLazyList.get(2); Assert.assertEquals(2, queryParametersLazyList.sizeCached()); } | public void setMaxCacheSize(int maxCacheSize) { if (maxCacheSize == 0) { this.maxCacheSize = 1; } else if (maxCacheSize < 0) { this.maxCacheSize = -1; } else { this.maxCacheSize = maxCacheSize; } } | QueryParametersLazyList implements List<QueryParameters> { public void setMaxCacheSize(int maxCacheSize) { if (maxCacheSize == 0) { this.maxCacheSize = 1; } else if (maxCacheSize < 0) { this.maxCacheSize = -1; } else { this.maxCacheSize = maxCacheSize; } } } | QueryParametersLazyList implements List<QueryParameters> { public void setMaxCacheSize(int maxCacheSize) { if (maxCacheSize == 0) { this.maxCacheSize = 1; } else if (maxCacheSize < 0) { this.maxCacheSize = -1; } else { this.maxCacheSize = maxCacheSize; } } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler... | QueryParametersLazyList implements List<QueryParameters> { public void setMaxCacheSize(int maxCacheSize) { if (maxCacheSize == 0) { this.maxCacheSize = 1; } else if (maxCacheSize < 0) { this.maxCacheSize = -1; } else { this.maxCacheSize = maxCacheSize; } } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler... | QueryParametersLazyList implements List<QueryParameters> { public void setMaxCacheSize(int maxCacheSize) { if (maxCacheSize == 0) { this.maxCacheSize = 1; } else if (maxCacheSize < 0) { this.maxCacheSize = -1; } else { this.maxCacheSize = maxCacheSize; } } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler... |
@Test public void testGetAsyncQueryRunner() throws Exception { Assert.assertEquals(true, MidaoFactory.getAsyncQueryRunner(null, null) instanceof AsyncQueryRunner); } | public static AsyncQueryRunnerService getAsyncQueryRunner(QueryRunner runner, ExecutorService executorService) { return new AsyncQueryRunner(runner, executorService); } | MidaoFactory { public static AsyncQueryRunnerService getAsyncQueryRunner(QueryRunner runner, ExecutorService executorService) { return new AsyncQueryRunner(runner, executorService); } } | MidaoFactory { public static AsyncQueryRunnerService getAsyncQueryRunner(QueryRunner runner, ExecutorService executorService) { return new AsyncQueryRunner(runner, executorService); } } | MidaoFactory { public static AsyncQueryRunnerService getAsyncQueryRunner(QueryRunner runner, ExecutorService executorService) { return new AsyncQueryRunner(runner, executorService); } static QueryRunnerService getQueryRunner(DataSource ds); static QueryRunnerService getQueryRunner(DataSource ds, Class<? extends TypeHa... | MidaoFactory { public static AsyncQueryRunnerService getAsyncQueryRunner(QueryRunner runner, ExecutorService executorService) { return new AsyncQueryRunner(runner, executorService); } static QueryRunnerService getQueryRunner(DataSource ds); static QueryRunnerService getQueryRunner(DataSource ds, Class<? extends TypeHa... |
@Test public void testIsEmpty() throws Exception { Assert.assertEquals(false, queryParametersLazyList.isEmpty()); } | public boolean isEmpty() { boolean result = generatedCacheMap.isEmpty(); return result; } | QueryParametersLazyList implements List<QueryParameters> { public boolean isEmpty() { boolean result = generatedCacheMap.isEmpty(); return result; } } | QueryParametersLazyList implements List<QueryParameters> { public boolean isEmpty() { boolean result = generatedCacheMap.isEmpty(); return result; } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHand... | QueryParametersLazyList implements List<QueryParameters> { public boolean isEmpty() { boolean result = generatedCacheMap.isEmpty(); return result; } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHand... | QueryParametersLazyList implements List<QueryParameters> { public boolean isEmpty() { boolean result = generatedCacheMap.isEmpty(); return result; } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHand... |
@Test(expected = MjdbcRuntimeException.class) public void testSize() throws Exception { queryParametersLazyList.size(); } | public int size() { throw new MjdbcRuntimeException("Size is unknown in lazy cache implementation. Please use sizeCached()"); } | QueryParametersLazyList implements List<QueryParameters> { public int size() { throw new MjdbcRuntimeException("Size is unknown in lazy cache implementation. Please use sizeCached()"); } } | QueryParametersLazyList implements List<QueryParameters> { public int size() { throw new MjdbcRuntimeException("Size is unknown in lazy cache implementation. Please use sizeCached()"); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParam... | QueryParametersLazyList implements List<QueryParameters> { public int size() { throw new MjdbcRuntimeException("Size is unknown in lazy cache implementation. Please use sizeCached()"); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParam... | QueryParametersLazyList implements List<QueryParameters> { public int size() { throw new MjdbcRuntimeException("Size is unknown in lazy cache implementation. Please use sizeCached()"); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParam... |
@Test public void testSizeCached() throws Exception { Assert.assertEquals(1, queryParametersLazyList.sizeCached()); queryParametersLazyList.get(1); queryParametersLazyList.get(2); Assert.assertEquals(3, queryParametersLazyList.sizeCached()); } | public int sizeCached() { return generatedCacheMap.size() + resultSetCacheMap.size(); } | QueryParametersLazyList implements List<QueryParameters> { public int sizeCached() { return generatedCacheMap.size() + resultSetCacheMap.size(); } } | QueryParametersLazyList implements List<QueryParameters> { public int sizeCached() { return generatedCacheMap.size() + resultSetCacheMap.size(); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandle... | QueryParametersLazyList implements List<QueryParameters> { public int sizeCached() { return generatedCacheMap.size() + resultSetCacheMap.size(); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandle... | QueryParametersLazyList implements List<QueryParameters> { public int sizeCached() { return generatedCacheMap.size() + resultSetCacheMap.size(); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandle... |
@Test(expected = MjdbcRuntimeException.class) public void testToArray() throws Exception { queryParametersLazyList.toArray(); } | public Object[] toArray() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use toArrayCached instead."); } | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArray() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use toArrayCached instead."); } } | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArray() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use toArrayCached instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLa... | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArray() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use toArrayCached instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLa... | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArray() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use toArrayCached instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLa... |
@Test public void testToArrayCached() throws Exception { Object[] result = queryParametersLazyList.toArrayCached(); Assert.assertEquals(1, result.length); queryParametersLazyList.get(1); queryParametersLazyList.get(2); result = queryParametersLazyList.toArrayCached(); Assert.assertEquals(3, result.length); Assert.asser... | public Object[] toArrayCached() { Object[] readCacheArray = generatedCacheMap.values().toArray(); Object[] writeCacheArray = resultSetCacheMap.values().toArray(); Object[] combinedCacheArray = new Object[readCacheArray.length + writeCacheArray.length]; System.arraycopy(readCacheArray, 0, combinedCacheArray, 0, readCach... | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArrayCached() { Object[] readCacheArray = generatedCacheMap.values().toArray(); Object[] writeCacheArray = resultSetCacheMap.values().toArray(); Object[] combinedCacheArray = new Object[readCacheArray.length + writeCacheArray.length]; System.a... | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArrayCached() { Object[] readCacheArray = generatedCacheMap.values().toArray(); Object[] writeCacheArray = resultSetCacheMap.values().toArray(); Object[] combinedCacheArray = new Object[readCacheArray.length + writeCacheArray.length]; System.a... | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArrayCached() { Object[] readCacheArray = generatedCacheMap.values().toArray(); Object[] writeCacheArray = resultSetCacheMap.values().toArray(); Object[] combinedCacheArray = new Object[readCacheArray.length + writeCacheArray.length]; System.a... | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArrayCached() { Object[] readCacheArray = generatedCacheMap.values().toArray(); Object[] writeCacheArray = resultSetCacheMap.values().toArray(); Object[] combinedCacheArray = new Object[readCacheArray.length + writeCacheArray.length]; System.a... |
@Test(expected = MjdbcRuntimeException.class) public void testToArrayType() throws Exception { queryParametersLazyList.toArray(new String[0]); } | public Object[] toArray() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use toArrayCached instead."); } | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArray() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use toArrayCached instead."); } } | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArray() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use toArrayCached instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLa... | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArray() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use toArrayCached instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLa... | QueryParametersLazyList implements List<QueryParameters> { public Object[] toArray() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use toArrayCached instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLa... |
@Test(expected = MjdbcRuntimeException.class) public void testSubList() throws Exception { queryParametersLazyList.subList(0, 2); } | public List<QueryParameters> subList(int fromIndex, int toIndex) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use subListCached instead."); } | QueryParametersLazyList implements List<QueryParameters> { public List<QueryParameters> subList(int fromIndex, int toIndex) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use subListCached instead."); } } | QueryParametersLazyList implements List<QueryParameters> { public List<QueryParameters> subList(int fromIndex, int toIndex) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use subListCached instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type... | QueryParametersLazyList implements List<QueryParameters> { public List<QueryParameters> subList(int fromIndex, int toIndex) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use subListCached instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type... | QueryParametersLazyList implements List<QueryParameters> { public List<QueryParameters> subList(int fromIndex, int toIndex) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use subListCached instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type... |
@Test public void testSubListCached() throws Exception { List<QueryParameters> result = null; try { result = queryParametersLazyList.subListCached(1, 3); fail(); } catch (IndexOutOfBoundsException ex) { } queryParametersLazyList.get(1); queryParametersLazyList.get(2); result = queryParametersLazyList.subListCached(1, 3... | public List<QueryParameters> subListCached(int fromIndex, int toIndex) { ArrayList<QueryParameters> result = new ArrayList<QueryParameters>(); result.addAll(generatedCacheMap.values()); result.addAll(resultSetCacheMap.values()); return result.subList(fromIndex, toIndex); } | QueryParametersLazyList implements List<QueryParameters> { public List<QueryParameters> subListCached(int fromIndex, int toIndex) { ArrayList<QueryParameters> result = new ArrayList<QueryParameters>(); result.addAll(generatedCacheMap.values()); result.addAll(resultSetCacheMap.values()); return result.subList(fromIndex,... | QueryParametersLazyList implements List<QueryParameters> { public List<QueryParameters> subListCached(int fromIndex, int toIndex) { ArrayList<QueryParameters> result = new ArrayList<QueryParameters>(); result.addAll(generatedCacheMap.values()); result.addAll(resultSetCacheMap.values()); return result.subList(fromIndex,... | QueryParametersLazyList implements List<QueryParameters> { public List<QueryParameters> subListCached(int fromIndex, int toIndex) { ArrayList<QueryParameters> result = new ArrayList<QueryParameters>(); result.addAll(generatedCacheMap.values()); result.addAll(resultSetCacheMap.values()); return result.subList(fromIndex,... | QueryParametersLazyList implements List<QueryParameters> { public List<QueryParameters> subListCached(int fromIndex, int toIndex) { ArrayList<QueryParameters> result = new ArrayList<QueryParameters>(); result.addAll(generatedCacheMap.values()); result.addAll(resultSetCacheMap.values()); return result.subList(fromIndex,... |
@Test public void testGet() throws Exception { Assert.assertEquals("Nightcrawler", queryParametersLazyList.get(1).getValue("name")); Assert.assertEquals("Lobo", queryParametersLazyList.get(2).getValue("name")); Assert.assertEquals(null, queryParametersLazyList.get(3)); } | public QueryParameters get(int index) { if (getCurrentResultSet() == null && index > 0 && valueCached(index) == false) { return null; } QueryParameters params = null; try { if (valueCached(index) == false) { if (this.type == Type.READ_ONLY_FORWARD && currentIndex >= index) { throw new MjdbcRuntimeException("Attempt to ... | QueryParametersLazyList implements List<QueryParameters> { public QueryParameters get(int index) { if (getCurrentResultSet() == null && index > 0 && valueCached(index) == false) { return null; } QueryParameters params = null; try { if (valueCached(index) == false) { if (this.type == Type.READ_ONLY_FORWARD && currentInd... | QueryParametersLazyList implements List<QueryParameters> { public QueryParameters get(int index) { if (getCurrentResultSet() == null && index > 0 && valueCached(index) == false) { return null; } QueryParameters params = null; try { if (valueCached(index) == false) { if (this.type == Type.READ_ONLY_FORWARD && currentInd... | QueryParametersLazyList implements List<QueryParameters> { public QueryParameters get(int index) { if (getCurrentResultSet() == null && index > 0 && valueCached(index) == false) { return null; } QueryParameters params = null; try { if (valueCached(index) == false) { if (this.type == Type.READ_ONLY_FORWARD && currentInd... | QueryParametersLazyList implements List<QueryParameters> { public QueryParameters get(int index) { if (getCurrentResultSet() == null && index > 0 && valueCached(index) == false) { return null; } QueryParameters params = null; try { if (valueCached(index) == false) { if (this.type == Type.READ_ONLY_FORWARD && currentInd... |
@Test public void testClose() throws Exception { queryParametersLazyList.close(); verify(rs, times(1)).close(); verify(stmt, times(1)).close(); } | public void close() { while (getCurrentResultSet() != null) { try { closeResultSet(getCurrentResultSet()); setCurrentResultSet(getNextResultSet()); } catch (SQLException ex) { setCurrentResultSet(null); } } MjdbcUtils.closeQuietly(stmt); } | QueryParametersLazyList implements List<QueryParameters> { public void close() { while (getCurrentResultSet() != null) { try { closeResultSet(getCurrentResultSet()); setCurrentResultSet(getNextResultSet()); } catch (SQLException ex) { setCurrentResultSet(null); } } MjdbcUtils.closeQuietly(stmt); } } | QueryParametersLazyList implements List<QueryParameters> { public void close() { while (getCurrentResultSet() != null) { try { closeResultSet(getCurrentResultSet()); setCurrentResultSet(getNextResultSet()); } catch (SQLException ex) { setCurrentResultSet(null); } } MjdbcUtils.closeQuietly(stmt); } QueryParametersLazyLi... | QueryParametersLazyList implements List<QueryParameters> { public void close() { while (getCurrentResultSet() != null) { try { closeResultSet(getCurrentResultSet()); setCurrentResultSet(getNextResultSet()); } catch (SQLException ex) { setCurrentResultSet(null); } } MjdbcUtils.closeQuietly(stmt); } QueryParametersLazyLi... | QueryParametersLazyList implements List<QueryParameters> { public void close() { while (getCurrentResultSet() != null) { try { closeResultSet(getCurrentResultSet()); setCurrentResultSet(getNextResultSet()); } catch (SQLException ex) { setCurrentResultSet(null); } } MjdbcUtils.closeQuietly(stmt); } QueryParametersLazyLi... |
@Test(expected = NoClassDefFoundError.class) public void testCreateDataSourceProp() throws Exception { MidaoFactory.createDataSource(new Properties()); } | public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } } | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } } | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } static QueryRunnerService getQueryR... | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } static QueryRunnerService getQueryR... |
@Test public void testIterator() throws Exception { Iterator<QueryParameters> iter = queryParametersLazyList.iterator(); iter.next(); Assert.assertEquals("Nightcrawler", iter.next().getValue("name")); Assert.assertEquals("Lobo", iter.next().getValue("name")); } | public Iterator<QueryParameters> iterator() { final QueryParametersLazyList source = this; return new Iterator<QueryParameters>() { private LazyCacheIterator<QueryParameters> lazyCacheIterator = source.getLazyCacheIterator(-1); public boolean hasNext() { return lazyCacheIterator.hasNext(); } public QueryParameters next... | QueryParametersLazyList implements List<QueryParameters> { public Iterator<QueryParameters> iterator() { final QueryParametersLazyList source = this; return new Iterator<QueryParameters>() { private LazyCacheIterator<QueryParameters> lazyCacheIterator = source.getLazyCacheIterator(-1); public boolean hasNext() { return... | QueryParametersLazyList implements List<QueryParameters> { public Iterator<QueryParameters> iterator() { final QueryParametersLazyList source = this; return new Iterator<QueryParameters>() { private LazyCacheIterator<QueryParameters> lazyCacheIterator = source.getLazyCacheIterator(-1); public boolean hasNext() { return... | QueryParametersLazyList implements List<QueryParameters> { public Iterator<QueryParameters> iterator() { final QueryParametersLazyList source = this; return new Iterator<QueryParameters>() { private LazyCacheIterator<QueryParameters> lazyCacheIterator = source.getLazyCacheIterator(-1); public boolean hasNext() { return... | QueryParametersLazyList implements List<QueryParameters> { public Iterator<QueryParameters> iterator() { final QueryParametersLazyList source = this; return new Iterator<QueryParameters>() { private LazyCacheIterator<QueryParameters> lazyCacheIterator = source.getLazyCacheIterator(-1); public boolean hasNext() { return... |
@Test public void testSet() throws Exception { QueryParameters paramsOriginal1 = null; QueryParameters paramsOriginal2 = null; QueryParameters paramsSet = new QueryParameters(); paramsOriginal1 = queryParametersLazyList.get(1); paramsOriginal2 = queryParametersLazyList.set(1, paramsSet); Assert.assertEquals(paramsOrigi... | public QueryParameters set(int index, QueryParameters element) { QueryParameters params = null; if (getMaxCacheSize() != -1) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + ". Cache update is allowed when Cache is not limited (used by Cached output handlers)"); } if (valueCached(index) == true) { params = readCac... | QueryParametersLazyList implements List<QueryParameters> { public QueryParameters set(int index, QueryParameters element) { QueryParameters params = null; if (getMaxCacheSize() != -1) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + ". Cache update is allowed when Cache is not limited (used by Cached output handle... | QueryParametersLazyList implements List<QueryParameters> { public QueryParameters set(int index, QueryParameters element) { QueryParameters params = null; if (getMaxCacheSize() != -1) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + ". Cache update is allowed when Cache is not limited (used by Cached output handle... | QueryParametersLazyList implements List<QueryParameters> { public QueryParameters set(int index, QueryParameters element) { QueryParameters params = null; if (getMaxCacheSize() != -1) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + ". Cache update is allowed when Cache is not limited (used by Cached output handle... | QueryParametersLazyList implements List<QueryParameters> { public QueryParameters set(int index, QueryParameters element) { QueryParameters params = null; if (getMaxCacheSize() != -1) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + ". Cache update is allowed when Cache is not limited (used by Cached output handle... |
@Test(expected = MjdbcRuntimeException.class) public void testListIterator() throws Exception { queryParametersLazyList.listIterator(); } | public ListIterator<QueryParameters> listIterator() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use iterator() instead."); } | QueryParametersLazyList implements List<QueryParameters> { public ListIterator<QueryParameters> listIterator() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use iterator() instead."); } } | QueryParametersLazyList implements List<QueryParameters> { public ListIterator<QueryParameters> listIterator() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use iterator() instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSi... | QueryParametersLazyList implements List<QueryParameters> { public ListIterator<QueryParameters> listIterator() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use iterator() instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSi... | QueryParametersLazyList implements List<QueryParameters> { public ListIterator<QueryParameters> listIterator() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use iterator() instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSi... |
@Test(expected = MjdbcRuntimeException.class) public void testListIteratorIndex() throws Exception { queryParametersLazyList.listIterator(1); } | public ListIterator<QueryParameters> listIterator() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use iterator() instead."); } | QueryParametersLazyList implements List<QueryParameters> { public ListIterator<QueryParameters> listIterator() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use iterator() instead."); } } | QueryParametersLazyList implements List<QueryParameters> { public ListIterator<QueryParameters> listIterator() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use iterator() instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSi... | QueryParametersLazyList implements List<QueryParameters> { public ListIterator<QueryParameters> listIterator() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use iterator() instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSi... | QueryParametersLazyList implements List<QueryParameters> { public ListIterator<QueryParameters> listIterator() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + " Please use iterator() instead."); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSi... |
@Test(expected = MjdbcRuntimeException.class) public void testAdd() throws Exception { queryParametersLazyList.add(null); } | public boolean add(QueryParameters queryParameters) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public boolean add(QueryParameters queryParameters) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public boolean add(QueryParameters queryParameters) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statem... | QueryParametersLazyList implements List<QueryParameters> { public boolean add(QueryParameters queryParameters) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statem... | QueryParametersLazyList implements List<QueryParameters> { public boolean add(QueryParameters queryParameters) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statem... |
@Test(expected = MjdbcRuntimeException.class) public void testAddIndex() throws Exception { queryParametersLazyList.add(1, null); } | public boolean add(QueryParameters queryParameters) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public boolean add(QueryParameters queryParameters) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public boolean add(QueryParameters queryParameters) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statem... | QueryParametersLazyList implements List<QueryParameters> { public boolean add(QueryParameters queryParameters) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statem... | QueryParametersLazyList implements List<QueryParameters> { public boolean add(QueryParameters queryParameters) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statem... |
@Test(expected = MjdbcRuntimeException.class) public void testAddAll() throws Exception { queryParametersLazyList.addAll(Arrays.<QueryParameters>asList(new QueryParameters[0])); } | public boolean addAll(Collection<? extends QueryParameters> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public boolean addAll(Collection<? extends QueryParameters> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public boolean addAll(Collection<? extends QueryParameters> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazy... | QueryParametersLazyList implements List<QueryParameters> { public boolean addAll(Collection<? extends QueryParameters> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazy... | QueryParametersLazyList implements List<QueryParameters> { public boolean addAll(Collection<? extends QueryParameters> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazy... |
@Test(expected = MjdbcRuntimeException.class) public void testAddAllIndex() throws Exception { queryParametersLazyList.addAll(1, Arrays.<QueryParameters>asList(new QueryParameters[0])); } | public boolean addAll(Collection<? extends QueryParameters> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public boolean addAll(Collection<? extends QueryParameters> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public boolean addAll(Collection<? extends QueryParameters> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazy... | QueryParametersLazyList implements List<QueryParameters> { public boolean addAll(Collection<? extends QueryParameters> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazy... | QueryParametersLazyList implements List<QueryParameters> { public boolean addAll(Collection<? extends QueryParameters> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazy... |
@Test(expected = MjdbcRuntimeException.class) public void testRemove() throws Exception { queryParametersLazyList.remove(null); } | public boolean remove(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public boolean remove(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public boolean remove(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandle... | QueryParametersLazyList implements List<QueryParameters> { public boolean remove(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandle... | QueryParametersLazyList implements List<QueryParameters> { public boolean remove(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandle... |
@Test(expected = MjdbcRuntimeException.class) public void testRemoveIndex() throws Exception { queryParametersLazyList.remove(1); } | public boolean remove(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public boolean remove(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public boolean remove(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandle... | QueryParametersLazyList implements List<QueryParameters> { public boolean remove(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandle... | QueryParametersLazyList implements List<QueryParameters> { public boolean remove(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandle... |
@Test(expected = NoClassDefFoundError.class) public void testCreateDataSourceUrl1() throws Exception { MidaoFactory.createDataSource(""); } | public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } } | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } } | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } static QueryRunnerService getQueryR... | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } static QueryRunnerService getQueryR... |
@Test(expected = MjdbcRuntimeException.class) public void testRemoveAll() throws Exception { queryParametersLazyList.removeAll(Arrays.<QueryParameters>asList(new QueryParameters[0])); } | public boolean removeAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public boolean removeAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public boolean removeAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, ... | QueryParametersLazyList implements List<QueryParameters> { public boolean removeAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, ... | QueryParametersLazyList implements List<QueryParameters> { public boolean removeAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, ... |
@Test(expected = MjdbcRuntimeException.class) public void testRetainAll() throws Exception { queryParametersLazyList.retainAll(Arrays.<QueryParameters>asList(new QueryParameters[0])); } | public boolean retainAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public boolean retainAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public boolean retainAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, ... | QueryParametersLazyList implements List<QueryParameters> { public boolean retainAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, ... | QueryParametersLazyList implements List<QueryParameters> { public boolean retainAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, ... |
@Test(expected = MjdbcRuntimeException.class) public void testClear() throws Exception { queryParametersLazyList.clear(); } | public void clear() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public void clear() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public void clear() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandler typeHandle... | QueryParametersLazyList implements List<QueryParameters> { public void clear() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandler typeHandle... | QueryParametersLazyList implements List<QueryParameters> { public void clear() { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandler typeHandle... |
@Test(expected = MjdbcRuntimeException.class) public void testContains() throws Exception { queryParametersLazyList.contains(null); } | public boolean contains(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public boolean contains(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public boolean contains(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHand... | QueryParametersLazyList implements List<QueryParameters> { public boolean contains(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHand... | QueryParametersLazyList implements List<QueryParameters> { public boolean contains(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHand... |
@Test(expected = MjdbcRuntimeException.class) public void testContainsAll() throws Exception { queryParametersLazyList.containsAll(Arrays.<QueryParameters>asList(new QueryParameters[0])); } | public boolean containsAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public boolean containsAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public boolean containsAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt... | QueryParametersLazyList implements List<QueryParameters> { public boolean containsAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt... | QueryParametersLazyList implements List<QueryParameters> { public boolean containsAll(Collection<?> c) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt... |
@Test(expected = MjdbcRuntimeException.class) public void testIndexOf() throws Exception { queryParametersLazyList.indexOf(null); } | public int indexOf(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public int indexOf(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public int indexOf(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandler t... | QueryParametersLazyList implements List<QueryParameters> { public int indexOf(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandler t... | QueryParametersLazyList implements List<QueryParameters> { public int indexOf(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandler t... |
@Test(expected = MjdbcRuntimeException.class) public void testLastIndexOf() throws Exception { queryParametersLazyList.lastIndexOf(null); } | public int lastIndexOf(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } | QueryParametersLazyList implements List<QueryParameters> { public int lastIndexOf(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } } | QueryParametersLazyList implements List<QueryParameters> { public int lastIndexOf(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandl... | QueryParametersLazyList implements List<QueryParameters> { public int lastIndexOf(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandl... | QueryParametersLazyList implements List<QueryParameters> { public int lastIndexOf(Object o) { throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED); } QueryParametersLazyList(Statement stmt, TypeHandler typeHandler, boolean readGeneratedKeys, Type type, int maxCacheSize); QueryParametersLazyList(Statement stmt, TypeHandl... |
@Test public void testConstructorMap() { QueryParameters params = new QueryParameters(superMap); Assert.assertEquals(superMap.get("name"), params.getValue("name")); Assert.assertEquals(superMap.get("origin"), params.getValue("origin")); Assert.assertEquals(superMap.get("strength"), params.getValue("strength")); } | public Object getValue(String key) { return this.values.get(processKey(key)); } | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } } | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(O... | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(O... | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(O... |
@Test public void testConstructorBean() { QueryParameters params = new QueryParameters(superman.getClass(), superman); Assert.assertEquals(superman.getName(), params.getValue("name")); Assert.assertEquals(superman.getOrigin(), params.getValue("origin")); Assert.assertEquals(superman.getStrength(), params.getValue("stre... | public Object getValue(String key) { return this.values.get(processKey(key)); } | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } } | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(O... | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(O... | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(O... |
@Test public void testConstructorProcessedInput() { ProcessedInput processedInput = new ProcessedInput("original query"); processedInput.addParameter("name", 1, 2); processedInput.addParameter("origin", 1, 2); processedInput.addParameter("strength", 1, 2); processedInput.setSqlParameterValues(Arrays.<Object>asList(supe... | public Object getValue(String key) { return this.values.get(processKey(key)); } | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } } | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(O... | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(O... | QueryParameters { public Object getValue(String key) { return this.values.get(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(O... |
@Test(expected = NoClassDefFoundError.class) public void testCreateDataSourceUrl2() throws Exception { MidaoFactory.createDataSource("", "", ""); } | public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } } | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } } | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } static QueryRunnerService getQueryR... | MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } static QueryRunnerService getQueryR... |
@Test public void testCreateAdapter() { DefaultCallAdapterFactory factory = new DefaultCallAdapterFactory(false, LOGGER); Type returnType = new ParameterizedType() { @Override public Type[] getActualTypeArguments() { return new Type[]{String.class}; } @Override public Type getRawType() { return CompletableFuture.class;... | @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedType)) { throw new IllegalStateException("CompletableFuture... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... |
@Test public void testMockUpdate() { final BotUpdateProcessor processor = new NoOpBotUpdateProcessor(); final boolean handled = processor.handleUpdate(Mockito.mock(Update.class)); assertTrue(handled); } | @Override public boolean handleUpdate(@Nonnull final Update update) { return true; } | NoOpBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { return true; } } | NoOpBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { return true; } } | NoOpBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { return true; } static NoOpBotUpdateProcessor getDefault(); @Override boolean handleUpdate(@Nonnull final Update update); } | NoOpBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { return true; } static NoOpBotUpdateProcessor getDefault(); @Override boolean handleUpdate(@Nonnull final Update update); } |
@Test public void testGetInterval() { final long interval = new Random().nextInt(1000) + 1; SteadyBackOff backOff = new SteadyBackOff(interval); assertEquals(interval, backOff.getInterval()); int round = new Random().nextInt(100) + 1; while (round > 0) { assertEquals(interval, backOff.getNextBackOffInMilli()); round--;... | public final long getInterval() { return interval; } | SteadyBackOff implements BackOff { public final long getInterval() { return interval; } } | SteadyBackOff implements BackOff { public final long getInterval() { return interval; } SteadyBackOff(final long interval); } | SteadyBackOff implements BackOff { public final long getInterval() { return interval; } SteadyBackOff(final long interval); static SteadyBackOff newInstance(); @Override long getNextBackOffInMilli(); @Override void reset(); final long getInterval(); } | SteadyBackOff implements BackOff { public final long getInterval() { return interval; } SteadyBackOff(final long interval); static SteadyBackOff newInstance(); @Override long getNextBackOffInMilli(); @Override void reset(); final long getInterval(); static final long DEFAULT_INTERVAL_IN_MILLI; } |
@Test public void testParseCommand() { Command cmd; cmd = parseCommandFromText(null); assertNull(cmd); cmd = parseCommandFromText("\n"); assertNull(cmd); cmd = parseCommandFromText(" assertNull(cmd); cmd = parseCommandFromText("/ "); assertNull(cmd); cmd = parseCommandFromText("/ /aaa"); assertNull(cmd); cmd = parseCom... | public static Command parseCommandFromText(final String text) { if (isNullOrEmpty(text) || !text.startsWith(CMD_PREFIX)) { return null; } String[] tmp = text.split(" ", 2); String argument = tmp.length > 1 ? tmp[1] : null; String cmdToBot = tmp[0].replaceFirst(CMD_PREFIX, ""); if (!CMD_PATTERN.matcher(cmdToBot).matches... | CommandUtil { public static Command parseCommandFromText(final String text) { if (isNullOrEmpty(text) || !text.startsWith(CMD_PREFIX)) { return null; } String[] tmp = text.split(" ", 2); String argument = tmp.length > 1 ? tmp[1] : null; String cmdToBot = tmp[0].replaceFirst(CMD_PREFIX, ""); if (!CMD_PATTERN.matcher(cmd... | CommandUtil { public static Command parseCommandFromText(final String text) { if (isNullOrEmpty(text) || !text.startsWith(CMD_PREFIX)) { return null; } String[] tmp = text.split(" ", 2); String argument = tmp.length > 1 ? tmp[1] : null; String cmdToBot = tmp[0].replaceFirst(CMD_PREFIX, ""); if (!CMD_PATTERN.matcher(cmd... | CommandUtil { public static Command parseCommandFromText(final String text) { if (isNullOrEmpty(text) || !text.startsWith(CMD_PREFIX)) { return null; } String[] tmp = text.split(" ", 2); String argument = tmp.length > 1 ? tmp[1] : null; String cmdToBot = tmp[0].replaceFirst(CMD_PREFIX, ""); if (!CMD_PATTERN.matcher(cmd... | CommandUtil { public static Command parseCommandFromText(final String text) { if (isNullOrEmpty(text) || !text.startsWith(CMD_PREFIX)) { return null; } String[] tmp = text.split(" ", 2); String argument = tmp.length > 1 ? tmp[1] : null; String cmdToBot = tmp[0].replaceFirst(CMD_PREFIX, ""); if (!CMD_PATTERN.matcher(cmd... |
@Test(expected = IllegalStateException.class) public void testNonParameterizedCompletableFuture() { DefaultCallAdapterFactory factory = new DefaultCallAdapterFactory(false, LOGGER); assertNull(factory.get(CompletableFuture.class, new Annotation[0], null)); } | @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedType)) { throw new IllegalStateException("CompletableFuture... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... |
@Test public void testUnsupportedReturnType() { DefaultCallAdapterFactory factory = new DefaultCallAdapterFactory(false, LOGGER); assertNull(factory.get(Object.class, new Annotation[0], null)); } | @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedType)) { throw new IllegalStateException("CompletableFuture... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... | DefaultCallAdapterFactory extends CallAdapter.Factory { @Override public CallAdapter<?, ?> get(@Nonnull final Type returnType, @Nonnull final Annotation[] annotations, @Nonnull final Retrofit retrofit) { if (getRawType(returnType) != CompletableFuture.class) { return null; } if (!(returnType instanceof ParameterizedTyp... |
@Test public void testAdapt() { Type returnType = new ParameterizedType() { @Override public Type[] getActualTypeArguments() { return new Type[]{String.class}; } @Override public Type getRawType() { return CompletableFuture.class; } @Override public Type getOwnerType() { return Object.class; } }; CompletableFutureBased... | @Nonnull @Override public CompletableFuture<T> adapt(@Nonnull final Call<ApiResponse<T>> call) { final CompletableFuture<T> fut = new CompletableFuture<T>() { @Override public boolean cancel(final boolean mayInterruptIfRunning) { if (mayInterruptIfRunning) { call.cancel(); } return super.cancel(mayInterruptIfRunning); ... | CompletableFutureBasedCallAdapter implements CallAdapter<ApiResponse<T>, CompletableFuture<T>> { @Nonnull @Override public CompletableFuture<T> adapt(@Nonnull final Call<ApiResponse<T>> call) { final CompletableFuture<T> fut = new CompletableFuture<T>() { @Override public boolean cancel(final boolean mayInterruptIfRunn... | CompletableFutureBasedCallAdapter implements CallAdapter<ApiResponse<T>, CompletableFuture<T>> { @Nonnull @Override public CompletableFuture<T> adapt(@Nonnull final Call<ApiResponse<T>> call) { final CompletableFuture<T> fut = new CompletableFuture<T>() { @Override public boolean cancel(final boolean mayInterruptIfRunn... | CompletableFutureBasedCallAdapter implements CallAdapter<ApiResponse<T>, CompletableFuture<T>> { @Nonnull @Override public CompletableFuture<T> adapt(@Nonnull final Call<ApiResponse<T>> call) { final CompletableFuture<T> fut = new CompletableFuture<T>() { @Override public boolean cancel(final boolean mayInterruptIfRunn... | CompletableFutureBasedCallAdapter implements CallAdapter<ApiResponse<T>, CompletableFuture<T>> { @Nonnull @Override public CompletableFuture<T> adapt(@Nonnull final Call<ApiResponse<T>> call) { final CompletableFuture<T> fut = new CompletableFuture<T>() { @Override public boolean cancel(final boolean mayInterruptIfRunn... |
@Test public void testCustomization() { final long interval = 10; BackOffHandler handler = new FixedBackOff(interval, 100L).start(); for (int i = 1; i <= 11; i++) { if (i <= 10) { assertEquals(interval, handler.nextBackOff()); } else { assertEquals(STOP, handler.nextBackOff()); } } } | @Override public BackOffHandler start() { return new FixedBackOffHandler(); } | FixedBackOff implements BackOff { @Override public BackOffHandler start() { return new FixedBackOffHandler(); } } | FixedBackOff implements BackOff { @Override public BackOffHandler start() { return new FixedBackOffHandler(); } private FixedBackOff(); FixedBackOff(@Nullable final Long internal, @Nullable final Long maxElapsedTime); } | FixedBackOff implements BackOff { @Override public BackOffHandler start() { return new FixedBackOffHandler(); } private FixedBackOff(); FixedBackOff(@Nullable final Long internal, @Nullable final Long maxElapsedTime); static FixedBackOff getDefault(); @Override BackOffHandler start(); long getInterval(); @Override lo... | FixedBackOff implements BackOff { @Override public BackOffHandler start() { return new FixedBackOffHandler(); } private FixedBackOff(); FixedBackOff(@Nullable final Long internal, @Nullable final Long maxElapsedTime); static FixedBackOff getDefault(); @Override BackOffHandler start(); long getInterval(); @Override lo... |
@Test public void testCustomization() { long interval = 1; final double multiplier = 2.0; final long maxInterval = 32; BackOffHandler handler = new ExponentialBackOff(1L, multiplier, maxInterval, 128L).start(); for (int i = 1; i <= 12; i++) { if (i <= 6) { assertEquals(interval, handler.nextBackOff()); interval *= mult... | @Override public BackOffHandler start() { return new ExponentialBackOffHandler(); } | ExponentialBackOff implements BackOff { @Override public BackOffHandler start() { return new ExponentialBackOffHandler(); } } | ExponentialBackOff implements BackOff { @Override public BackOffHandler start() { return new ExponentialBackOffHandler(); } private ExponentialBackOff(); ExponentialBackOff(
@Nullable final Long initialInterval,
@Nullable final Double multiplier,
@Nullable final Long maxInterval,
... | ExponentialBackOff implements BackOff { @Override public BackOffHandler start() { return new ExponentialBackOffHandler(); } private ExponentialBackOff(); ExponentialBackOff(
@Nullable final Long initialInterval,
@Nullable final Double multiplier,
@Nullable final Long maxInterval,
... | ExponentialBackOff implements BackOff { @Override public BackOffHandler start() { return new ExponentialBackOffHandler(); } private ExponentialBackOff(); ExponentialBackOff(
@Nullable final Long initialInterval,
@Nullable final Double multiplier,
@Nullable final Long maxInterval,
... |
@Test public void testVerifyToken() { try { verifyToken(null); fail(); } catch (IllegalArgumentException e) { } try { verifyToken("\n"); fail(); } catch (IllegalArgumentException e) { } try { verifyToken(":"); fail(); } catch (IllegalArgumentException e) { } try { verifyToken(":aa"); fail(); } catch (IllegalArgumentExc... | public static void verifyToken(final String token) { checkArgument(!isNullOrEmpty(token), "Token can not be null or empty string!"); if (!TOKEN_PATTERN.matcher(token).matches()) { throw new IllegalArgumentException("Invalid token: " + token); } } | TelegramUtils { public static void verifyToken(final String token) { checkArgument(!isNullOrEmpty(token), "Token can not be null or empty string!"); if (!TOKEN_PATTERN.matcher(token).matches()) { throw new IllegalArgumentException("Invalid token: " + token); } } } | TelegramUtils { public static void verifyToken(final String token) { checkArgument(!isNullOrEmpty(token), "Token can not be null or empty string!"); if (!TOKEN_PATTERN.matcher(token).matches()) { throw new IllegalArgumentException("Invalid token: " + token); } } } | TelegramUtils { public static void verifyToken(final String token) { checkArgument(!isNullOrEmpty(token), "Token can not be null or empty string!"); if (!TOKEN_PATTERN.matcher(token).matches()) { throw new IllegalArgumentException("Invalid token: " + token); } } static void verifyToken(final String token); static Stri... | TelegramUtils { public static void verifyToken(final String token) { checkArgument(!isNullOrEmpty(token), "Token can not be null or empty string!"); if (!TOKEN_PATTERN.matcher(token).matches()) { throw new IllegalArgumentException("Invalid token: " + token); } } static void verifyToken(final String token); static Stri... |
@Test public void testParseBotIdFromToken() { assertEquals("000", parseBotIdFromToken("000:bb")); } | public static String parseBotIdFromToken(final String token) { verifyToken(token); return token.split(":", 2)[0]; } | TelegramUtils { public static String parseBotIdFromToken(final String token) { verifyToken(token); return token.split(":", 2)[0]; } } | TelegramUtils { public static String parseBotIdFromToken(final String token) { verifyToken(token); return token.split(":", 2)[0]; } } | TelegramUtils { public static String parseBotIdFromToken(final String token) { verifyToken(token); return token.split(":", 2)[0]; } static void verifyToken(final String token); static String parseBotIdFromToken(final String token); } | TelegramUtils { public static String parseBotIdFromToken(final String token) { verifyToken(token); return token.split(":", 2)[0]; } static void verifyToken(final String token); static String parseBotIdFromToken(final String token); } |
@Test public void testMockUpdate() { final BotUpdateProcessor processor = new LogOnlyBotUpdateProcessor(mockLogger); final boolean handled = processor.handleUpdate(Mockito.mock(Update.class)); assertTrue(handled); verify(mockLogger, times(1)).info(anyString()); } | @Override public boolean handleUpdate(@Nonnull final Update update) { logger.info(JsonUtil.toJson(update)); return true; } | LogOnlyBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { logger.info(JsonUtil.toJson(update)); return true; } } | LogOnlyBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { logger.info(JsonUtil.toJson(update)); return true; } LogOnlyBotUpdateProcessor(@Nonnull final Logger logger); } | LogOnlyBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { logger.info(JsonUtil.toJson(update)); return true; } LogOnlyBotUpdateProcessor(@Nonnull final Logger logger); @Override boolean handleUpdate(@Nonnull final Update update); } | LogOnlyBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { logger.info(JsonUtil.toJson(update)); return true; } LogOnlyBotUpdateProcessor(@Nonnull final Logger logger); @Override boolean handleUpdate(@Nonnull final Update update); } |
@Test public void testHandleNullUpdate() { final BotUpdateProcessor processor = new NoOpBotUpdateProcessor(); final boolean handled = processor.handleUpdate(null); assertTrue(handled); } | @Override public boolean handleUpdate(@Nonnull final Update update) { return true; } | NoOpBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { return true; } } | NoOpBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { return true; } } | NoOpBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { return true; } static NoOpBotUpdateProcessor getDefault(); @Override boolean handleUpdate(@Nonnull final Update update); } | NoOpBotUpdateProcessor implements BotUpdateProcessor { @Override public boolean handleUpdate(@Nonnull final Update update) { return true; } static NoOpBotUpdateProcessor getDefault(); @Override boolean handleUpdate(@Nonnull final Update update); } |
@Test(expected = IllegalArgumentException.class) public void testSetThemeThrowsForNullPrimaryColor() { Colors.setTheme(null, AccentColor.AMBER_A200); } | public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); static void theme(Activity activity); static void theme(Activity activity, @Nullable String taskName,
@Nulla... | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); static void theme(Activity activity); static void theme(Activity activity, @Nullable String taskName,
@Nulla... |
@Test(expected = IllegalArgumentException.class) public void testSetThemeThrowsForNullAccentColor() { Colors.setTheme(PrimaryColor.RED_500, null); } | public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); static void theme(Activity activity); static void theme(Activity activity, @Nullable String taskName,
@Nulla... | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); static void theme(Activity activity); static void theme(Activity activity, @Nullable String taskName,
@Nulla... |
@Test(expected = IllegalArgumentException.class) public void testSetThemeThrowsForNullNightMode() { Colors.setTheme(PrimaryColor.RED_500, AccentColor.AMBER_A100, null); } | public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); static void theme(Activity activity); static void theme(Activity activity, @Nullable String taskName,
@Nulla... | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); static void theme(Activity activity); static void theme(Activity activity, @Nullable String taskName,
@Nulla... |
@Test(expected = IllegalArgumentException.class) public void testSetThemeThrowsForNullTheme() { Colors.setTheme(null); } | public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); } | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); static void theme(Activity activity); static void theme(Activity activity, @Nullable String taskName,
@Nulla... | Colors { public static void setTheme(@NonNull PrimaryColor primaryColor, @NonNull AccentColor accentColor) { setTheme(new ColorTheme(primaryColor, accentColor)); } private Colors(); static void theme(Activity activity); static void theme(Activity activity, @Nullable String taskName,
@Nulla... |
@Test public void onLoggedIn() { DigitalOcean.onLoggedIn("m31b5m13b1b23febm1513bj15hb"); } | public static void onLoggedIn(String token) { DigitalOcean.authToken = token; if (okHttpClient == null) { OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() .addInterceptor(new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request().newBuilder... | DigitalOcean { public static void onLoggedIn(String token) { DigitalOcean.authToken = token; if (okHttpClient == null) { OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() .addInterceptor(new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.reque... | DigitalOcean { public static void onLoggedIn(String token) { DigitalOcean.authToken = token; if (okHttpClient == null) { OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() .addInterceptor(new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.reque... | DigitalOcean { public static void onLoggedIn(String token) { DigitalOcean.authToken = token; if (okHttpClient == null) { OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() .addInterceptor(new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.reque... | DigitalOcean { public static void onLoggedIn(String token) { DigitalOcean.authToken = token; if (okHttpClient == null) { OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() .addInterceptor(new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.reque... |
@Test public void testCommandLine() throws IOException { File tmpDir = createTmpDir(); File outputDir = createTmpDir(); copyResource("/smoothstreaming/audio-96000.mp4", tmpDir); copyResource("/smoothstreaming/video-128h-75kbps.mp4", tmpDir); copyResource("/smoothstreaming/video-192h-155kbps.mp4", tmpDir); copyResource(... | public void run() throws IOException { FlatPackageWriterImpl flatPackageWriter = new FlatPackageWriterImpl(0); flatPackageWriter.setDebugOutput(debug); flatPackageWriter.setOutputDirectory(outputDir); Movie movie = new Movie(); for (File input : inputFiles) { System.err.println(input.getAbsolutePath()); Movie m = Movie... | FragmentFileSet { public void run() throws IOException { FlatPackageWriterImpl flatPackageWriter = new FlatPackageWriterImpl(0); flatPackageWriter.setDebugOutput(debug); flatPackageWriter.setOutputDirectory(outputDir); Movie movie = new Movie(); for (File input : inputFiles) { System.err.println(input.getAbsolutePath()... | FragmentFileSet { public void run() throws IOException { FlatPackageWriterImpl flatPackageWriter = new FlatPackageWriterImpl(0); flatPackageWriter.setDebugOutput(debug); flatPackageWriter.setOutputDirectory(outputDir); Movie movie = new Movie(); for (File input : inputFiles) { System.err.println(input.getAbsolutePath()... | FragmentFileSet { public void run() throws IOException { FlatPackageWriterImpl flatPackageWriter = new FlatPackageWriterImpl(0); flatPackageWriter.setDebugOutput(debug); flatPackageWriter.setOutputDirectory(outputDir); Movie movie = new Movie(); for (File input : inputFiles) { System.err.println(input.getAbsolutePath()... | FragmentFileSet { public void run() throws IOException { FlatPackageWriterImpl flatPackageWriter = new FlatPackageWriterImpl(0); flatPackageWriter.setDebugOutput(debug); flatPackageWriter.setOutputDirectory(outputDir); Movie movie = new Movie(); for (File input : inputFiles) { System.err.println(input.getAbsolutePath()... |
@Test public void testRead_8() { BitReaderBuffer bitReaderBuffer = new BitReaderBuffer(testSequence); Assert.assertEquals(15, bitReaderBuffer.readBits(4)); Assert.assertEquals(15, bitReaderBuffer.readBits(4)); Assert.assertEquals(0, bitReaderBuffer.readBits(4)); Assert.assertEquals(0, bitReaderBuffer.readBits(4)); } | public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits(now); rc = rc << ... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... |
@Test public void testReadCrossByte() { BitReaderBuffer bitReaderBuffer = new BitReaderBuffer(testSequence); Assert.assertEquals(31, bitReaderBuffer.readBits(5)); Assert.assertEquals(14, bitReaderBuffer.readBits(4)); Assert.assertEquals(0, bitReaderBuffer.readBits(3)); Assert.assertEquals(0, bitReaderBuffer.readBits(4)... | public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits(now); rc = rc << ... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... |
@Test public void testReadMultiByte() { BitReaderBuffer bitReaderBuffer = new BitReaderBuffer(testSequence); Assert.assertEquals(510, bitReaderBuffer.readBits(9)); } | public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits(now); rc = rc << ... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... |
@Test public void testReadMultiByte2() { BitReaderBuffer bitReaderBuffer = new BitReaderBuffer(testSequence); Assert.assertEquals(0x1fe01, bitReaderBuffer.readBits(17)); } | public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits(now); rc = rc << ... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... | BitReaderBuffer { public int readBits(int i) { byte b = buffer.get(initialPos + position / 8); int v = b < 0 ? b + 256 : b; int left = 8 - position % 8; int rc; if (i <= left) { rc = (v << (position % 8) & 0xFF) >> ((position % 8) + (left - i)); position += i; } else { int now = left; int then = i - left; rc = readBits... |
@Test public void testRemainingBits() { BitReaderBuffer bitReaderBuffer = new BitReaderBuffer(testSequence); Assert.assertEquals(32, bitReaderBuffer.remainingBits()); int six = 6; bitReaderBuffer.readBits(six); Assert.assertEquals(32 - six, bitReaderBuffer.remainingBits()); } | public int remainingBits() { return buffer.limit() * 8 - position; } | BitReaderBuffer { public int remainingBits() { return buffer.limit() * 8 - position; } } | BitReaderBuffer { public int remainingBits() { return buffer.limit() * 8 - position; } BitReaderBuffer(ByteBuffer buffer); } | BitReaderBuffer { public int remainingBits() { return buffer.limit() * 8 - position; } BitReaderBuffer(ByteBuffer buffer); int readBits(int i); int getPosition(); int byteSync(); int remainingBits(); } | BitReaderBuffer { public int remainingBits() { return buffer.limit() * 8 - position; } BitReaderBuffer(ByteBuffer buffer); int readBits(int i); int getPosition(); int byteSync(); int remainingBits(); } |
@Test public void testFindSameFrameRate() throws IOException { Movie m = InTestMovieCreator.createMovieOnlyVideo( "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_150.mp4", "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_200.mp4" ); SyncSampleIntersectFinderImpl syncSampleIntersectFinder = new SyncSampleIntersectFinderImpl(); long[... | public long[] sampleNumbers(Track track, Movie movie) { final CacheTuple key = new CacheTuple(track, movie); final long[] result = getSampleNumbersCache.get(key); if (result != null) { return result; } if ("vide".equals(track.getHandler())) { if (track.getSyncSamples() != null && track.getSyncSamples().length > 0) { Li... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { final CacheTuple key = new CacheTuple(track, movie); final long[] result = getSampleNumbersCache.get(key); if (result != null) { return result; } if ("vide".equals(track.getHandler())) { if (tra... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { final CacheTuple key = new CacheTuple(track, movie); final long[] result = getSampleNumbersCache.get(key); if (result != null) { return result; } if ("vide".equals(track.getHandler())) { if (tra... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { final CacheTuple key = new CacheTuple(track, movie); final long[] result = getSampleNumbersCache.get(key); if (result != null) { return result; } if ("vide".equals(track.getHandler())) { if (tra... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { final CacheTuple key = new CacheTuple(track, movie); final long[] result = getSampleNumbersCache.get(key); if (result != null) { return result; } if ("vide".equals(track.getHandler())) { if (tra... |
@Test public void testGetIndicesToBeRemoved() { SyncSampleIntersectFinderImpl syncSampleIntersectFinder = new SyncSampleIntersectFinderImpl(); long[] a_sample = new long[]{20, 40, 48, 60, 80, 82}; long[] a_times = new long[]{10, 20, 24, 30, 40, 41}; long[] b_1 = new long[]{10, 20, 26, 30, 40}; long[] b_2 = new long[]{1... | public long[] getCommonIndices(long[] syncSamples, long[] syncSampleTimes, long timeScale, long[]... otherTracksTimes) { List<Long> nuSyncSamples = new LinkedList<Long>(); List<Long> nuSyncSampleTimes = new LinkedList<Long>(); for (int i = 0; i < syncSampleTimes.length; i++) { boolean foundInEveryRef = true; for (long[... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] getCommonIndices(long[] syncSamples, long[] syncSampleTimes, long timeScale, long[]... otherTracksTimes) { List<Long> nuSyncSamples = new LinkedList<Long>(); List<Long> nuSyncSampleTimes = new LinkedList<Long>(); for (int i = 0; i < syn... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] getCommonIndices(long[] syncSamples, long[] syncSampleTimes, long timeScale, long[]... otherTracksTimes) { List<Long> nuSyncSamples = new LinkedList<Long>(); List<Long> nuSyncSampleTimes = new LinkedList<Long>(); for (int i = 0; i < syn... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] getCommonIndices(long[] syncSamples, long[] syncSampleTimes, long timeScale, long[]... otherTracksTimes) { List<Long> nuSyncSamples = new LinkedList<Long>(); List<Long> nuSyncSampleTimes = new LinkedList<Long>(); for (int i = 0; i < syn... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] getCommonIndices(long[] syncSamples, long[] syncSampleTimes, long timeScale, long[]... otherTracksTimes) { List<Long> nuSyncSamples = new LinkedList<Long>(); List<Long> nuSyncSampleTimes = new LinkedList<Long>(); for (int i = 0; i < syn... |
@Test public void testGetIndicesToBeRemovedMinTwoSecondsFragments() { SyncSampleIntersectFinderImpl syncSampleIntersectFinder = new SyncSampleIntersectFinderImpl(2); long[] a_sample = new long[]{20, 40, 48, 60, 80, 82, 90, 100}; long[] a_times = new long[]{10, 20, 24, 30, 60, 61, 80, 81}; long[] b_1 = new long[]{10, 20... | public long[] getCommonIndices(long[] syncSamples, long[] syncSampleTimes, long timeScale, long[]... otherTracksTimes) { List<Long> nuSyncSamples = new LinkedList<Long>(); List<Long> nuSyncSampleTimes = new LinkedList<Long>(); for (int i = 0; i < syncSampleTimes.length; i++) { boolean foundInEveryRef = true; for (long[... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] getCommonIndices(long[] syncSamples, long[] syncSampleTimes, long timeScale, long[]... otherTracksTimes) { List<Long> nuSyncSamples = new LinkedList<Long>(); List<Long> nuSyncSampleTimes = new LinkedList<Long>(); for (int i = 0; i < syn... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] getCommonIndices(long[] syncSamples, long[] syncSampleTimes, long timeScale, long[]... otherTracksTimes) { List<Long> nuSyncSamples = new LinkedList<Long>(); List<Long> nuSyncSampleTimes = new LinkedList<Long>(); for (int i = 0; i < syn... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] getCommonIndices(long[] syncSamples, long[] syncSampleTimes, long timeScale, long[]... otherTracksTimes) { List<Long> nuSyncSamples = new LinkedList<Long>(); List<Long> nuSyncSampleTimes = new LinkedList<Long>(); for (int i = 0; i < syn... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] getCommonIndices(long[] syncSamples, long[] syncSampleTimes, long timeScale, long[]... otherTracksTimes) { List<Long> nuSyncSamples = new LinkedList<Long>(); List<Long> nuSyncSampleTimes = new LinkedList<Long>(); for (int i = 0; i < syn... |
@Test public void testFindDifferentFrameRates() throws IOException { Movie m = InTestMovieCreator.createMovieOnlyVideo( "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_80.mp4", "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_100.mp4", "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_120.mp4", "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_150... | public long[] sampleNumbers(Track track, Movie movie) { final CacheTuple key = new CacheTuple(track, movie); final long[] result = getSampleNumbersCache.get(key); if (result != null) { return result; } if ("vide".equals(track.getHandler())) { if (track.getSyncSamples() != null && track.getSyncSamples().length > 0) { Li... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { final CacheTuple key = new CacheTuple(track, movie); final long[] result = getSampleNumbersCache.get(key); if (result != null) { return result; } if ("vide".equals(track.getHandler())) { if (tra... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { final CacheTuple key = new CacheTuple(track, movie); final long[] result = getSampleNumbersCache.get(key); if (result != null) { return result; } if ("vide".equals(track.getHandler())) { if (tra... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { final CacheTuple key = new CacheTuple(track, movie); final long[] result = getSampleNumbersCache.get(key); if (result != null) { return result; } if ("vide".equals(track.getHandler())) { if (tra... | SyncSampleIntersectFinderImpl implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { final CacheTuple key = new CacheTuple(track, movie); final long[] result = getSampleNumbersCache.get(key); if (result != null) { return result; } if ("vide".equals(track.getHandler())) { if (tra... |
@Test public void testSampleNumbers() throws Exception { Movie m = MovieCreator.build(Channels.newChannel(TwoSecondIntersectionFinderTest.class.getResourceAsStream("/Beethoven - Bagatelle op.119 no.11 i.m4a"))); TwoSecondIntersectionFinder intersectionFinder = new TwoSecondIntersectionFinder(); long[] s = intersectionF... | public long[] sampleNumbers(Track track, Movie movie) { List<TimeToSampleBox.Entry> entries = track.getDecodingTimeEntries(); double trackLength = 0; for (Track thisTrack : movie.getTracks()) { double thisTracksLength = getDuration(thisTrack) / thisTrack.getTrackMetaData().getTimescale(); if (trackLength < thisTracksLe... | TwoSecondIntersectionFinder implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { List<TimeToSampleBox.Entry> entries = track.getDecodingTimeEntries(); double trackLength = 0; for (Track thisTrack : movie.getTracks()) { double thisTracksLength = getDuration(thisTrack) / thisTra... | TwoSecondIntersectionFinder implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { List<TimeToSampleBox.Entry> entries = track.getDecodingTimeEntries(); double trackLength = 0; for (Track thisTrack : movie.getTracks()) { double thisTracksLength = getDuration(thisTrack) / thisTra... | TwoSecondIntersectionFinder implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { List<TimeToSampleBox.Entry> entries = track.getDecodingTimeEntries(); double trackLength = 0; for (Track thisTrack : movie.getTracks()) { double thisTracksLength = getDuration(thisTrack) / thisTra... | TwoSecondIntersectionFinder implements FragmentIntersectionFinder { public long[] sampleNumbers(Track track, Movie movie) { List<TimeToSampleBox.Entry> entries = track.getDecodingTimeEntries(); double trackLength = 0; for (Track thisTrack : movie.getTracks()) { double thisTracksLength = getDuration(thisTrack) / thisTra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.