本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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