Code example for AudioManager

Methods: getStreamMaxVolume

0
 
    @Test 
    public void shouldGetStreamMaxVolume() throws Exception { 
        shadowAudioManager.setStreamMaxVolume(45);
 
        assertEquals(45, audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC));
    } 
 
    @Test 
    public void shouldGetVolume() throws Exception { 
        shadowAudioManager.setStreamVolume(5);
 
        assertEquals(5, audioManager.getStreamVolume(AudioManager.STREAM_MUSIC));
    } 
 
    @Test 
    public void shouldSetVolume() throws Exception { 
        audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, 8, 0);
 
        assertEquals(8, audioManager.getStreamVolume(AudioManager.STREAM_MUSIC));
        assertEquals(8, shadowAudioManager.getStreamVolume());