chapter_002/src/test/java/ru/job4j/ConvertListTest.java
@Test
    public void whenToListArrayMassiveThenListWithSameElemtnts() {
        ConvertList convertList = new ConvertList();
        int[][] ints = new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 0, 0}};
        List<Integer> expect = new ArrayList<>();
        expect.addAll(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 0, 0));
        List<Integer> rezult = convertList.toList(ints);
        assertThat(expect, is(rezult));
    }
/**
     * Test 1. From Array to List.
     */
Test 1. From Array to List.
Test 1 . From Array to List .
@Test
    public void whenToListArrayMassiveThenListWithSameElemtnts() {
        ConvertList convertList = new ConvertList();
        int[][] ints = new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 0, 0}};
        List<Integer> expect = new ArrayList<>();
        expect.addAll(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 0, 0));
        List<Integer> rezult = convertList.toList(ints);
        assertThat(expect, is(rezult));
    }
@ Test public void whenToListArrayMassiveThenListWithSameElemtnts ( ) { ConvertList convertList = new ConvertList ( ) ; int [ ] [ ] ints = new int [ ] [ ] { { 1 , 2 , 3 } , { 4 , 5 , 6 } , { 7 , 0 , 0 } } ; List < Integer > expect = new ArrayList < > ( ) ; expect . addAll ( Arrays . asList ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 0 , 0 ) ) ; List < Integer > rezult = convertList . toList ( ints ) ; assertThat ( expect , is ( rezult ) ) ; }
Test 1.
Test 1 .