chapter_002/src/test/java/ru/job4j/start/StartUITest.java
@Test
    public void whenFindByIdThenReturnAllItemWithInputName() {
        Tracker tracker = new Tracker();
        Input input = new StubInput(new String[]{
                "0", "test name", "desc", "12",
                "0", "test name2", "desc2", "13",
                "0", "test name3", "desc3", "14",
                "6", "yes"});
        new StartUI(input, tracker).init();
        assertThat(tracker.findByName("test name2").get(0).getName(), is("test name2"));
    }
/**
     * Test find item by name.
     */
Test find item by name.
Test find item by name .
@Test
    public void whenFindByIdThenReturnAllItemWithInputName() {
        Tracker tracker = new Tracker();
        Input input = new StubInput(new String[]{
                "0", "test name", "desc", "12",
                "0", "test name2", "desc2", "13",
                "0", "test name3", "desc3", "14",
                "6", "yes"});
        new StartUI(input, tracker).init();
        assertThat(tracker.findByName("test name2").get(0).getName(), is("test name2"));
    }
@ Test public void whenFindByIdThenReturnAllItemWithInputName ( ) { Tracker tracker = new Tracker ( ) ; Input input = new StubInput ( new String [ ] { "0" , "test name" , "desc" , "12" , "0" , "test name2" , "desc2" , "13" , "0" , "test name3" , "desc3" , "14" , "6" , "yes" } ) ; new StartUI ( input , tracker ) . init ( ) ; assertThat ( tracker . findByName ( "test name2" ) . get ( 0 ) . getName ( ) , is ( "test name2" ) ) ; }
Test find item by name.
Test find item by name .