@Test public void Collectionからの変換() throws Exception { // exercise char[] actual = AsciiChar.toCharArray(Arrays.asList(AsciiChar.A, AsciiChar.B, AsciiChar.C)); // verify assertThat(toCharacterArray(actual), is(arrayContaining('A', 'B', 'C'))); }
@Test public void Collectionからの変換_nullを渡すと空のchar配列を返す() throws Exception { // exercise char[] actual = AsciiChar.toCharArray((List<AsciiChar>) null); // verify assertThat(toCharacterArray(actual), is(emptyArray())); }
@Test public void 配列からの変換() throws Exception { // exercise char[] actual = AsciiChar.toCharArray(new AsciiChar[] {AsciiChar.A, AsciiChar.B, AsciiChar.C}); // verify assertThat(toCharacterArray(actual), is(arrayContaining('A', 'B', 'C'))); }