当前位置: 首页>>代码示例>>Java>>正文


Java Arrays.array方法代码示例

本文整理汇总了Java中org.assertj.core.util.Arrays.array方法的典型用法代码示例。如果您正苦于以下问题:Java Arrays.array方法的具体用法?Java Arrays.array怎么用?Java Arrays.array使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.assertj.core.util.Arrays的用法示例。


在下文中一共展示了Arrays.array方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: shouldPrintVerboseResult

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
@Test
public void shouldPrintVerboseResult() {
    JacksonEvolutionResultConsumer<Integer> integerJacksonEvolutionResultConsumer = new JacksonEvolutionResultConsumer<Integer>();

    ComparisonResult<Integer> integerComparisonResult = new ComparisonResult<Integer>("testEvolution",
            ImplementationPreference.EVOLVED,
            new ProtoplastValueExecutionResult<Integer>(Arrays.array(1,2), 100, 6),
            new EvolvedValueExecutionResult<Integer>(Arrays.array(1,2), 130, 6),
            ResultType.OK);

    integerJacksonEvolutionResultConsumer.consumeResults(integerComparisonResult, ResultConsumerConfiguration.VERBOSE);
}
 
开发者ID:darwin-evolution,项目名称:darwin,代码行数:13,代码来源:JacksonEvolutionResultConsumerTest.java

示例2: shouldPrintSilentResult

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
@Test
public void shouldPrintSilentResult() {
    JacksonEvolutionResultConsumer<Integer> integerJacksonEvolutionResultConsumer = new JacksonEvolutionResultConsumer<Integer>();

    ComparisonResult<Integer> integerComparisonResult = new ComparisonResult<Integer>("testEvolution",
            ImplementationPreference.EVOLVED,
            new ProtoplastValueExecutionResult<Integer>(Arrays.array(1,2), 100, 6),
            new EvolvedValueExecutionResult<Integer>(Arrays.array(1,2), 130, 6),
            ResultType.OK);

    integerJacksonEvolutionResultConsumer.consumeResults(integerComparisonResult, ResultConsumerConfiguration.SILENT);
}
 
开发者ID:darwin-evolution,项目名称:darwin,代码行数:13,代码来源:JacksonEvolutionResultConsumerTest.java

示例3: createIntegerOkExceptionsComparisonResult

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
private static ComparisonResult<Integer> createIntegerOkExceptionsComparisonResult() {
    return new ComparisonResult<Integer>("testEvolution",
                ImplementationPreference.EVOLVED,
                new ProtoplastExceptionExecutionResult<Integer>(Arrays.array(-1,-2), 100, new Exception("fasd")),
                new EvolvedExceptionExecutionResult<Integer>(Arrays.array(-1,-2), 130, new Exception("fdsa")),
                ResultType.OK_EXCEPTIONS);
}
 
开发者ID:darwin-evolution,项目名称:darwin,代码行数:8,代码来源:Slf4jEvolutionResultConsumerTest.java

示例4: createIntegerValueOkComparisonResult

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
private static ComparisonResult<Integer> createIntegerValueOkComparisonResult() {
    return new ComparisonResult<Integer>("testEvolution",
            ImplementationPreference.EVOLVED,
            new ProtoplastValueExecutionResult<Integer>(Arrays.array(-1,-2), 100, -6),
            new EvolvedValueExecutionResult<Integer>(Arrays.array(-1,-2), 130, -6),
            ResultType.OK);
}
 
开发者ID:darwin-evolution,项目名称:darwin,代码行数:8,代码来源:Slf4jEvolutionResultConsumerTest.java

示例5: should_convert_sequence_of_blank_strings_to_empty_string_array

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
@Test
public void should_convert_sequence_of_blank_strings_to_empty_string_array() throws Exception {
    // given
    StateTypeConverter typeConverter = new StateTypeConverter();
    String[] arrayOfEmptyStrings = Arrays.array("", "", "", "", "");

    // when
    String[] convertedStringArray = typeConverter.convert(" ,   ,   ,   ,       ", String[].class);

    // then
    assertThat(convertedStringArray).isEqualTo(arrayOfEmptyStrings);
}
 
开发者ID:arquillian,项目名称:arquillian-algeron,代码行数:13,代码来源:StateTypeConverterTest.java

示例6: should_convert_single_element_to_one_element_array

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
@Test
public void should_convert_single_element_to_one_element_array() throws Exception {
    // given
    StateTypeConverter typeConverter = new StateTypeConverter();
    String[] singleElementArray = Arrays.array("one element");

    // when
    String[] convertedStringArray = typeConverter.convert("one element", String[].class);

    // then
    assertThat(convertedStringArray).isEqualTo(singleElementArray);
}
 
开发者ID:arquillian,项目名称:arquillian-algeron,代码行数:13,代码来源:StateTypeConverterTest.java

示例7: should_convert_single_element_with_delimiter_to_one_element_array

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
@Test
public void should_convert_single_element_with_delimiter_to_one_element_array() throws Exception {
    // given
    StateTypeConverter typeConverter = new StateTypeConverter();
    String[] singleElementArray = Arrays.array("one element");

    // when
    String[] convertedStringArray = typeConverter.convert("one element,", String[].class);

    // then
    assertThat(convertedStringArray).isEqualTo(singleElementArray);
}
 
开发者ID:arquillian,项目名称:arquillian-algeron,代码行数:13,代码来源:StateTypeConverterTest.java

示例8: should_convert_single_element_with_delimiters_to_one_element_array

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
@Test
public void should_convert_single_element_with_delimiters_to_one_element_array() throws Exception {
    // given
    StateTypeConverter typeConverter = new StateTypeConverter();
    String[] singleElementArray = Arrays.array("one element");

    // when
    String[] convertedStringArray = typeConverter.convert("one element,,,,,,,", String[].class);

    // then
    assertThat(convertedStringArray).isEqualTo(singleElementArray);
}
 
开发者ID:arquillian,项目名称:arquillian-algeron,代码行数:13,代码来源:StateTypeConverterTest.java

示例9: should_convert_blank_to_empty_string_when_appear_in_sequence_with_non_blanks

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
@Test
public void should_convert_blank_to_empty_string_when_appear_in_sequence_with_non_blanks() throws Exception {
    // given
    StateTypeConverter typeConverter = new StateTypeConverter();
    String[] expectedArray = Arrays.array("a", "", "test", "", "", "b");
    // when
    String[] convertedStringArray = typeConverter.convert("a,   , test  ,   ,      , b ", String[].class);

    // then
    assertThat(convertedStringArray).isEqualTo(expectedArray);
}
 
开发者ID:arquillian,项目名称:arquillian-algeron,代码行数:12,代码来源:StateTypeConverterTest.java

示例10: should_pass_if_actual_is_empty

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
@Test
public void should_pass_if_actual_is_empty() {
  actual = Arrays.<String> array();
  arrays.assertDoesNotContainNull(someInfo(), actual);
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:6,代码来源:ObjectArrays_assertDoesNotContainNull_Test.java

示例11: should_pass_if_actual_is_empty_whatever_custom_comparison_strategy_is

import org.assertj.core.util.Arrays; //导入方法依赖的package包/类
@Test
public void should_pass_if_actual_is_empty_whatever_custom_comparison_strategy_is() {
  actual = Arrays.<String> array();
  arraysWithCustomComparisonStrategy.assertDoesNotContainNull(someInfo(), actual);
}
 
开发者ID:joel-costigliola,项目名称:assertj-core,代码行数:6,代码来源:ObjectArrays_assertDoesNotContainNull_Test.java


注:本文中的org.assertj.core.util.Arrays.array方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。