org.junit.jupiter.params.provider.MethodSource Java Examples

The following examples show how to use org.junit.jupiter.params.provider.MethodSource. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SSZTestSuite.java    From incubator-tuweni with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest(name = "{index}. ssz->value {0} {3}->{2}")
@MethodSource("readUintBoundsTests")
void testUintBoundsFromSSZ(String type, boolean valid, String value, String ssz) {
  if (valid) {
    int bitLength = Integer.valueOf(type.substring("uint".length()));
    Bytes read;
    if (bitLength < 31) {
      read = Bytes.ofUnsignedLong((long) SSZ.decode(Bytes.fromHexString(ssz), reader -> reader.readUInt(bitLength)));
    } else if (bitLength < 62) {
      read = Bytes.ofUnsignedLong(SSZ.decode(Bytes.fromHexString(ssz), reader -> reader.readULong(bitLength)));
    } else {
      read = Bytes
          .wrap(
              SSZ.decode(Bytes.fromHexString(ssz), reader -> reader.readUnsignedBigInteger(bitLength)).toByteArray());
    }
    assertEquals(Bytes.wrap(new BigInteger(value).toByteArray()).toShortHexString(), read.toShortHexString());
  }
}
 
Example #2
Source File: RoutesLoaderTest.java    From camel-k-runtime with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource("parameters")
public void testLoaders(String location, Class<? extends SourceLoader> type) throws Exception {
    TestRuntime runtime = new TestRuntime();
    Source source = Sources.fromURI(location);
    SourceLoader loader = runtime.load(source);

    assertThat(loader).isInstanceOf(type);
    assertThat(runtime.builders).hasSize(1);
    assertThat(runtime.builders).first().isInstanceOf(RouteBuilder.class);

    RouteBuilder builder = (RouteBuilder)runtime.builders.get(0);
    builder.setContext(runtime.getCamelContext());
    builder.configure();

    List<RouteDefinition> routes = builder.getRouteCollection().getRoutes();
    assertThat(routes).hasSize(1);
    assertThat(routes.get(0).getInput().getEndpointUri()).isEqualTo("timer:tick");
    assertThat(routes.get(0).getOutputs().get(0)).isInstanceOf(ToDefinition.class);
}
 
Example #3
Source File: TestNumberBlockIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_range_6( final IBlockIndex index , final IFilter[] filter ) throws IOException{
  int[] mustReadIndex = { 0 , 1 , 2 , 3 };
  List<Integer> resultIndexList = index.getBlockSpreadIndex( filter[20] );
  if( resultIndexList == null ){
    assertTrue( true );
    return;
  }
  Set<Integer> dic = new HashSet<Integer>();
  for( Integer i : resultIndexList ){
    dic.add( i );
  }
  for( int i = 0 ; i < mustReadIndex.length ; i++ ){
    assertTrue( dic.contains( mustReadIndex[i] ) );
  }
}
 
Example #4
Source File: TestNumberCellIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_equal_obj_1( final IColumn column ) throws IOException{
  int[] mustReadIndex = { 0 };
  PrimitiveObject[] compareData = new PrimitiveObject[]{ new ByteObj( (byte)-10 ) , new ShortObj( (short)-10 ) , new IntegerObj( -10 ) , new LongObj( -10 ) , new FloatObj( -10.0f ) , new DoubleObj( -10.0d ) };
  for( PrimitiveObject obj : compareData ){
    IFilter filter = new NumberFilter( NumberFilterType.EQUAL , obj );
    boolean[] filterResult = new boolean[30];
    filterResult = column.filter( filter , filterResult );
    if( filterResult == null ){
      assertTrue( true );
      return;
    }
    for( int i = 0 ; i < mustReadIndex.length ; i++ ){
      assertTrue( filterResult[mustReadIndex[i]] );
    }
  }
}
 
Example #5
Source File: TestBooleanPrimitiveColumn.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_getPrimitiveObjectArray_1( final String targetClassName ) throws IOException{
  IColumn column = createNotNullColumn( targetClassName );
  IExpressionIndex indexList = new AllExpressionIndex( column.size() );
  PrimitiveObject[] objArray = column.getPrimitiveObjectArray( indexList , 0 , indexList.size() );

  assertEquals( objArray[0].getBoolean() , true );
  assertEquals( objArray[1].getBoolean() , false );
  assertEquals( objArray[2].getBoolean() , true );
  assertEquals( objArray[3].getBoolean() , false );
  assertEquals( objArray[4].getBoolean() , true );
  assertEquals( objArray[5].getBoolean() , false );
  assertEquals( objArray[6].getBoolean() , true );
  assertEquals( objArray[7].getBoolean() , false );
  assertEquals( objArray[8].getBoolean() , true );
  assertEquals( objArray[9].getBoolean() , false );
  assertEquals( objArray[10].getBoolean() , true );
}
 
Example #6
Source File: TestNumberBlockIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_range_1( final IBlockIndex index , final IFilter[] filter ) throws IOException{
  int[] mustReadIndex = { 0 };
  List<Integer> resultIndexList = index.getBlockSpreadIndex( filter[15] );
  if( resultIndexList == null ){
    assertTrue( true );
    return;
  }
  Set<Integer> dic = new HashSet<Integer>();
  for( Integer i : resultIndexList ){
    dic.add( i );
  }
  for( int i = 0 ; i < mustReadIndex.length ; i++ ){
    assertTrue( dic.contains( mustReadIndex[i] ) );
  }
}
 
Example #7
Source File: TestStringCellIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_forwardMatch_1( final IColumn column ) throws IOException{
  int[] mustReadIndex = { 0 };
  IFilter filter = new ForwardMatchStringFilter( "0" );
  boolean[] filterResult = new boolean[30];
  filterResult = column.filter( filter , filterResult );
  if( filterResult == null ){
    assertTrue( true );
    return;
  }
  //dumpFilterResult( filterResult );
  for( int i = 0 ; i < mustReadIndex.length ; i++ ){
    assertTrue( filterResult[mustReadIndex[i]] );
  }
}
 
Example #8
Source File: RoutesLoaderTest.java    From camel-k-runtime with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource("parameters")
public void testLoaders(String location, Class<? extends SourceLoader> type) throws Exception {
    TestRuntime runtime = new TestRuntime();
    Source source = Sources.fromURI(location);
    SourceLoader loader = RoutesConfigurer.load(runtime, source);

    assertThat(loader).isInstanceOf(type);
    assertThat(runtime.builders).hasSize(1);
    assertThat(runtime.builders).first().isInstanceOf(RouteBuilder.class);

    RouteBuilder builder = (RouteBuilder)runtime.builders.get(0);
    builder.setContext(runtime.getCamelContext());
    builder.configure();

    List<RouteDefinition> routes = builder.getRouteCollection().getRoutes();
    assertThat(routes).hasSize(1);
    assertThat(routes.get(0).getInput().getEndpointUri()).matches("timer:/*tick");
    assertThat(routes.get(0).getOutputs().get(0)).isInstanceOf(ToDefinition.class);
}
 
Example #9
Source File: TestIntegerPrimitiveColumn.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_encodeAndDecode_equalsSetValue_withInt16( final String targetClassName ) throws IOException{
  int[] intArray = new int[]{
    (int)Short.MAX_VALUE,
    (int)Short.MIN_VALUE,
    (int)Byte.MAX_VALUE,
    (int)Byte.MIN_VALUE,
    1,
    1,
    -1,
    -1,
    2,
    2
  };
  IColumn column = createTestColumn( targetClassName , intArray );
  assertEquals( column.size() , 10 );
  for ( int i = 0 ; i < 10 ; i++ ) {
    assertEquals( ( (PrimitiveObject)( column.get(i).getRow() ) ).getInt() , intArray[i] );
  }
}
 
Example #10
Source File: TestShortPrimitiveColumn.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_encodeAndDecode_equalsSetValue_withIntBit0( final String targetClassName ) throws IOException{
  short[] valueArray = new short[]{
    (short)0,
    (short)0,
    (short)0,
    (short)0,
    (short)0,
    (short)0,
    (short)0,
    (short)0,
    (short)0,
    (short)0
  };
  IColumn column = createTestColumn( targetClassName , valueArray );
  assertEquals( column.size() , 10 );
  for ( int i = 0 ; i < 10 ; i++ ) {
    assertEquals( ( (PrimitiveObject)( column.get(i).getRow() ) ).getShort() , valueArray[i] );
  }
}
 
Example #11
Source File: JsonComponentsTest.java    From camel-quarkus with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource("listJsonDataFormatsToBeTested")
public void testUnmarshallingDifferentPojos(String jsonComponent) {
    String bodyA = "{\"name\":\"name A\"}";
    String bodyB = "{\"value\":1.0}";

    RestAssured.given().contentType(ContentType.TEXT)
            .queryParam("json-component", jsonComponent)
            .body(bodyA)
            .post("/dataformats-json/in-a");
    RestAssured.given().contentType(ContentType.TEXT)
            .queryParam("json-component", jsonComponent)
            .body(bodyB)
            .post("/dataformats-json/in-b");
    RestAssured.given()
            .queryParam("json-component", jsonComponent)
            .post("/dataformats-json/out-a")
            .then()
            .body(equalTo(bodyA));
    RestAssured.given()
            .queryParam("json-component", jsonComponent)
            .post("/dataformats-json/out-b")
            .then()
            .body(equalTo(bodyB));
}
 
Example #12
Source File: TestNumberCellIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_ge_obj_2( final IColumn column ) throws IOException{
  int[] mustReadIndex = { 28 , 29 };
  PrimitiveObject[] compareData = new PrimitiveObject[]{ new ByteObj( (byte)28 ) , new ShortObj( (short)28 ) , new IntegerObj( 28 ) , new LongObj( 28 ) , new FloatObj( 28.0f ) , new DoubleObj( 28.0d ) };
  for( PrimitiveObject obj : compareData ){
    IFilter filter = new NumberFilter( NumberFilterType.GE , obj );
    boolean[] filterResult = new boolean[30];
    filterResult = column.filter( filter , filterResult );
    if( filterResult == null ){
      assertTrue( true );
      return;
    }
    for( int i = 0 ; i < mustReadIndex.length ; i++ ){
      assertTrue( filterResult[mustReadIndex[i]] );
    }
  }
}
 
Example #13
Source File: TestBooleanPrimitiveColumn.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_getPrimitiveObjectArray_2( final String targetClassName ) throws IOException{
  IColumn column = createNotNullColumn( targetClassName );
  List<Integer> list = new ArrayList<Integer>();
  list.add( Integer.valueOf( 0 ) );
  list.add( Integer.valueOf( 2 ) );
  list.add( Integer.valueOf( 4 ) );
  list.add( Integer.valueOf( 6 ) );
  list.add( Integer.valueOf( 8 ) );
  list.add( Integer.valueOf( 10 ) );
  IExpressionIndex indexList = new ListIndexExpressionIndex( list );
  PrimitiveObject[] objArray = column.getPrimitiveObjectArray( indexList , 0 , indexList.size() );

  assertEquals( objArray[0].getBoolean() , true );
  assertEquals( objArray[1].getBoolean() , true );
  assertEquals( objArray[2].getBoolean() , true );
  assertEquals( objArray[3].getBoolean() , true );
  assertEquals( objArray[4].getBoolean() , true );
  assertEquals( objArray[5].getBoolean() , true );
}
 
Example #14
Source File: TestNumberBlockIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_lt_2( final IBlockIndex index , final IFilter[] filter ) throws IOException{
  int[] mustReadIndex = { 0 };
  List<Integer> resultIndexList = index.getBlockSpreadIndex( filter[4] );
  if( resultIndexList == null ){
    assertTrue( true );
    return;
  }
  Set<Integer> dic = new HashSet<Integer>();
  for( Integer i : resultIndexList ){
    dic.add( i );
  }
  for( int i = 0 ; i < mustReadIndex.length ; i++ ){
    assertTrue( dic.contains( mustReadIndex[i] ) );
  }
}
 
Example #15
Source File: TestNumberBlockIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_gt_2( final IBlockIndex index , final IFilter[] filter ) throws IOException{
  int[] mustReadIndex = { 0 };
  List<Integer> resultIndexList = index.getBlockSpreadIndex( filter[10] );
  if( resultIndexList == null ){
    assertTrue( true );
    return;
  }
  Set<Integer> dic = new HashSet<Integer>();
  for( Integer i : resultIndexList ){
    dic.add( i );
  }
  for( int i = 0 ; i < mustReadIndex.length ; i++ ){
    assertTrue( dic.contains( mustReadIndex[i] ) );
  }
}
 
Example #16
Source File: TestIntegerPrimitiveColumn.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_encodeAndDecode_equalsSetValue_withInt32( final String targetClassName ) throws IOException{
  int[] intArray = new int[]{
    (int)Integer.MAX_VALUE,
    (int)Integer.MIN_VALUE,
    (int)Short.MAX_VALUE,
    (int)Short.MIN_VALUE,
    (int)Byte.MAX_VALUE,
    (int)Byte.MIN_VALUE,
    1,
    1,
    2,
    2
  };
  IColumn column = createTestColumn( targetClassName , intArray );
  assertEquals( column.size() , 10 );
  for ( int i = 0 ; i < 10 ; i++ ) {
    assertEquals( ( (PrimitiveObject)( column.get(i).getRow() ) ).getLong() , intArray[i] );
  }
}
 
Example #17
Source File: TestStringBlockIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_compareString_3( final IBlockIndex index ) throws IOException{
  int[] mustReadIndex = { 0 , 1 , 3 };
  IFilter filter = new RangeStringCompareFilter( "bb" , true , "x" , false );
  List<Integer> resultIndexList = index.getBlockSpreadIndex( filter );
  if( resultIndexList == null ){
    assertTrue( true );
    return;
  }
  Set<Integer> dic = new HashSet<Integer>();
  for( Integer i : resultIndexList ){
    dic.add( i );
  }
  for( int i = 0 ; i < mustReadIndex.length ; i++ ){
    assertTrue( dic.contains( mustReadIndex[i] ) );
  }
}
 
Example #18
Source File: TestStringCellIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_backwardMatch_1( final IColumn column ) throws IOException{
  int[] mustReadIndex = { 0 , 20 };
  IFilter filter = new BackwardMatchStringFilter( "0" );
  boolean[] filterResult = new boolean[30];
  filterResult = column.filter( filter , filterResult );
  if( filterResult == null ){
    assertTrue( true );
    return;
  }
  //dumpFilterResult( filterResult );
  for( int i = 0 ; i < mustReadIndex.length ; i++ ){
    assertTrue( filterResult[mustReadIndex[i]] );
  }
}
 
Example #19
Source File: TestNumberCellIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_le_obj_2( final IColumn column ) throws IOException{
  int[] mustReadIndex = { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 };
  PrimitiveObject[] compareData = new PrimitiveObject[]{ new ByteObj( (byte)29 ) , new ShortObj( (short)29 ) , new IntegerObj( 29 ) , new LongObj( 29 ) , new FloatObj( 29.0f ) , new DoubleObj( 29.0d ) };
  for( PrimitiveObject obj : compareData ){
    IFilter filter = new NumberFilter( NumberFilterType.LE , obj );
    boolean[] filterResult = new boolean[30];
    filterResult = column.filter( filter , filterResult );
    if( filterResult == null ){
      assertTrue( true );
      return;
    }
    for( int i = 0 ; i < mustReadIndex.length ; i++ ){
      assertTrue( filterResult[mustReadIndex[i]] );
    }
  }
}
 
Example #20
Source File: TestNumberCellIndex.java    From yosegi with Apache License 2.0 6 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_ge_obj_3( final IColumn column ) throws IOException{
  int[] mustReadIndex = { 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 };
  PrimitiveObject[] compareData = new PrimitiveObject[]{ new ByteObj( (byte)0 ) , new ShortObj( (short)0 ) , new IntegerObj( 0 ) , new LongObj( 0 ) , new FloatObj( 0.0f ) , new DoubleObj( 0.0d ) };
  for( PrimitiveObject obj : compareData ){
    IFilter filter = new NumberFilter( NumberFilterType.GE , obj );
    boolean[] filterResult = new boolean[30];
    filterResult = column.filter( filter , filterResult );
    if( filterResult == null ){
      assertTrue( true );
      return;
    }
    for( int i = 0 ; i < mustReadIndex.length ; i++ ){
      assertTrue( filterResult[mustReadIndex[i]] );
    }
  }
}
 
Example #21
Source File: LanguageDetectorImplTest.java    From jstarcraft-nlp with Apache License 2.0 5 votes vote down vote up
@ParameterizedTest
@MethodSource("confident")
public void confident(String expectedLanguage, CharSequence text) throws Exception {
    LanguageDetector languageDetector = makeNewDetector();
    List<DetectedLanguage> result = languageDetector.getProbabilities(text);
    DetectedLanguage best = result.get(0);
    Assert.assertEquals(best.getLocale().getLanguage(), expectedLanguage);
    Assert.assertTrue(best.getProbability() >= 0.9999d);
}
 
Example #22
Source File: TestCalcLogicalDataSizeBoolean.java    From yosegi with Apache License 2.0 5 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_hasNull_1( final String targetClassName ) throws IOException {
  IColumn column = new PrimitiveColumn( ColumnType.BOOLEAN , "column" );
  column.add( ColumnType.BOOLEAN , new BooleanObj( false ) , 1 );
  column.add( ColumnType.BOOLEAN , new BooleanObj( false ) , 2 );
  column.add( ColumnType.BOOLEAN , new BooleanObj( false ) , 4 );
  column.add( ColumnType.BOOLEAN , new BooleanObj( false ) , 5 );

  ColumnBinary columnBinary = create( column , targetClassName );
  assertEquals( columnBinary.logicalDataSize , 4 );
}
 
Example #23
Source File: WebApplicationConfigurationTests.java    From vividus with Apache License 2.0 5 votes vote down vote up
@ParameterizedTest
@MethodSource("resolutionDataProvider")
void testIsMobileWindowResolution(int actualWidth, boolean mobileViewport)
{
    WebApplicationConfiguration webApplicationConfiguration = prepareWebApplicationConfiguration();
    webApplicationConfiguration.setMobileScreenResolutionWidthThreshold(WIDTH_THRESHOLD);
    IJavascriptActions javascriptActions = mockJavascriptActions(actualWidth);
    assertEquals(mobileViewport, webApplicationConfiguration.isMobileViewport(javascriptActions));
}
 
Example #24
Source File: TestShortPrimitiveColumn.java    From yosegi with Apache License 2.0 5 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_hasNull_1( final String targetClassName ) throws IOException{
  IColumn column = createHasNullColumn( targetClassName );
  assertEquals( ( (PrimitiveObject)( column.get(0).getRow() ) ).getShort() , (short)0 );
  assertNull( column.get(1).getRow() );
  assertNull( column.get(2).getRow() );
  assertNull( column.get(3).getRow() );
  assertEquals( ( (PrimitiveObject)( column.get(4).getRow() ) ).getShort() , (short)4 );
  assertNull( column.get(5).getRow() );
  assertNull( column.get(6).getRow() );
  assertNull( column.get(7).getRow() );
  assertEquals( ( (PrimitiveObject)( column.get(8).getRow() ) ).getShort() , (short)8 );
}
 
Example #25
Source File: TestCalcLogicalDataSizeByte.java    From yosegi with Apache License 2.0 5 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_hasNull_5( final String targetClassName ) throws IOException {
  IColumn column = new PrimitiveColumn( ColumnType.BYTE , "column" );
  column.add( ColumnType.BYTE , new ByteObj( (byte)1 ) , 5 );
  column.add( ColumnType.BYTE , new ByteObj( (byte)1 ) , 6 );

  ColumnBinary columnBinary = create( column , targetClassName );
  assertEquals( columnBinary.logicalDataSize , Byte.BYTES * 2 );
}
 
Example #26
Source File: TestCalcLogicalDataSizeInteger.java    From yosegi with Apache License 2.0 5 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_hasNull_4( final String targetClassName ) throws IOException {
  IColumn column = new PrimitiveColumn( ColumnType.INTEGER , "column" );
  column.add( ColumnType.INTEGER , new IntegerObj( (int)1 ) , 1 );
  column.add( ColumnType.INTEGER , new IntegerObj( (int)1 ) , 2 );
  column.add( ColumnType.INTEGER , new IntegerObj( (int)1 ) , 4 );
  column.add( ColumnType.INTEGER , new IntegerObj( (int)1 ) , 5 );

  ColumnBinary columnBinary = create( column , targetClassName );
  assertEquals( columnBinary.logicalDataSize , Integer.BYTES * 4 );
}
 
Example #27
Source File: TestStringPrimitiveColumn.java    From yosegi with Apache License 2.0 5 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_null_1( final String targetClassName ) throws IOException{
  IColumn column = createNullColumn( targetClassName );
  assertNull( column.get(0).getRow() );
  assertNull( column.get(1).getRow() );
}
 
Example #28
Source File: TestCalcLogicalDataSizeInteger.java    From yosegi with Apache License 2.0 5 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_hasNull_5( final String targetClassName ) throws IOException {
  IColumn column = new PrimitiveColumn( ColumnType.INTEGER , "column" );
  column.add( ColumnType.INTEGER , new IntegerObj( (int)1 ) , 5 );
  column.add( ColumnType.INTEGER , new IntegerObj( (int)1 ) , 6 );

  ColumnBinary columnBinary = create( column , targetClassName );
  assertEquals( columnBinary.logicalDataSize , Integer.BYTES * 2 );
}
 
Example #29
Source File: TestSpread.java    From yosegi with Apache License 2.0 5 votes vote down vote up
@ParameterizedTest
@MethodSource( "D_T_addRowNotException")
public void T_getAllColumnNotException(final Object target) throws IOException {
    Spread spread = new Spread();
    spread.addRow("col1", target);
    spread.getAllColumn();
}
 
Example #30
Source File: TestCalcLogicalDataSizeBoolean.java    From yosegi with Apache License 2.0 5 votes vote down vote up
@ParameterizedTest
@MethodSource( "data1" )
public void T_hasNull_2( final String targetClassName ) throws IOException {
  IColumn column = new PrimitiveColumn( ColumnType.BOOLEAN , "column" );
  column.add( ColumnType.BOOLEAN , new BooleanObj( false ) , 5 );
  column.add( ColumnType.BOOLEAN , new BooleanObj( false ) , 6 );

  ColumnBinary columnBinary = create( column , targetClassName );
  assertEquals( columnBinary.logicalDataSize , 2 );
}