< prev index next >

test/javax/sound/midi/Gervill/SoftProvider/GetDevice.java

Print this page

        

@@ -25,13 +25,10 @@
    @summary Test SoftProvider getDevice method
    @modules java.desktop/com.sun.media.sound
 */
 
 import javax.sound.midi.MidiDevice;
-import javax.sound.midi.MidiUnavailableException;
-import javax.sound.midi.Patch;
-import javax.sound.sampled.*;
 import javax.sound.midi.MidiDevice.Info;
 
 import com.sun.media.sound.*;
 
 public class GetDevice {

@@ -46,25 +43,16 @@
     {
         if(!value)
             throw new RuntimeException("assertTrue fails!");
     }
 
-
-    private static class FakeInfo extends Info {
-        public FakeInfo() {
-            super("a", "b", "c", "d");
-        }
-    }
-
     public static void main(String[] args) throws Exception {
         SoftProvider provider = new SoftProvider();
         Info[] infos = provider.getDeviceInfo();
         assertTrue(infos.length > 0);
         for (int i = 0; i < infos.length; i++) {
             assertTrue(infos[i] != null);
             MidiDevice d = provider.getDevice(infos[i]);
             assertTrue(d instanceof SoftSynthesizer);
         }
-        assertTrue(provider.getDevice(new FakeInfo()) == null);
-
     }
 }
< prev index next >