Code example for List

Methods: containssize

0
        // WHEN 
        List<WeatherResult> listWeatherResult = dataPersistenceManager.loadAllDataFromCache();
 
        // THEN 
        assertNotNull(listWeatherResult);
        assertEquals(2, listWeatherResult.size());
        assertTrue(listWeatherResult.contains(weatherRequestStatus));
        assertTrue(listWeatherResult.contains(weatherRequestStatus2));
    } 
 
    public void test_loadAllDataFromCache_with_no_requests_in_cache() throws Exception { 
        // GIVEN 
 
        // WHEN 
        List<WeatherResult> listWeatherResult = dataPersistenceManager.loadAllDataFromCache();
 
        // THEN 
        assertNotNull(listWeatherResult);
        assertTrue(listWeatherResult.isEmpty());
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE