use of org.junit.Before in project lucene-skos by behas.
the class SKOSLabelFilterTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
skosAnalyzer = new SKOSAnalyzer(skosEngine, SKOSAnalyzer.ExpansionType.LABEL);
writer = new IndexWriter(directory, new IndexWriterConfig(skosAnalyzer));
}
use of org.junit.Before in project lucene-skos by behas.
the class SKOSURIFilterTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
skosAnalyzer = new SKOSAnalyzer(skosEngine, ExpansionType.URI);
writer = new IndexWriter(directory, new IndexWriterConfig(skosAnalyzer));
}
use of org.junit.Before in project YCSB by brianfrankcooper.
the class AccumuloTest method client.
@Before
public void client() throws Exception {
LOG.debug("Loading workload properties for {}", test.getMethodName());
workloadProps = new Properties();
workloadProps.load(getClass().getResourceAsStream("/workloads/" + test.getMethodName()));
for (String prop : properties.stringPropertyNames()) {
workloadProps.setProperty(prop, properties.getProperty(prop));
}
// TODO we need a better test rig for 'run this ycsb workload'
LOG.debug("initializing measurements and workload");
Measurements.setProperties(workloadProps);
workload = new CoreWorkload();
workload.init(workloadProps);
LOG.debug("initializing client");
client = new AccumuloClient();
client.setProperties(workloadProps);
client.init();
}
use of org.junit.Before in project HikariCP by brettwooldridge.
the class StatementTest method setup.
@Before
public void setup() {
HikariConfig config = newHikariConfig();
config.setMinimumIdle(1);
config.setMaximumPoolSize(2);
config.setConnectionTestQuery("VALUES 1");
config.setDataSourceClassName("com.zaxxer.hikari.mocks.StubDataSource");
ds = new HikariDataSource(config);
}
use of org.junit.Before in project glide by bumptech.
the class ByteBufferGifDecoderTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
gifHeader = Mockito.spy(new GifHeader());
when(parser.parseHeader()).thenReturn(gifHeader);
when(parserPool.obtain(isA(ByteBuffer.class))).thenReturn(parser);
when(decoderFactory.build(isA(GifDecoder.BitmapProvider.class), eq(gifHeader), isA(ByteBuffer.class), anyInt())).thenReturn(gifDecoder);
List<ImageHeaderParser> parsers = new ArrayList<ImageHeaderParser>();
parsers.add(new DefaultImageHeaderParser());
options = new Options();
decoder = new ByteBufferGifDecoder(RuntimeEnvironment.application, parsers, bitmapPool, new LruArrayPool(ARRAY_POOL_SIZE_BYTES), parserPool, decoderFactory);
}
Aggregations