package net.heartshield.signal;

import android.content.Context;
import android.support.test.InstrumentationRegistry;

import junit.framework.TestCase;

import java.io.IOException;

public class AudioDecoderTests extends TestCase {
    public void testReadWav() throws IOException {
        Context appContext = InstrumentationRegistry.getTargetContext();
        AudioDecoder dec = new AudioDecoder(appContext);
        short[] arr = dec.decodeToMemory(net.heartshield.signal.test.R.raw.test100hz);
        if(arr.length == 0)
            throw new IllegalStateException("failed");
    }
}
