FileDocCategorySizeDatePackage
EntropyMixerTest.javaAPI DocAndroid 5.1 API1439Thu Mar 12 22:22:42 GMT 2015com.android.server

EntropyMixerTest

public class EntropyMixerTest extends android.test.AndroidTestCase
Tests for {@link com.android.server.EntropyMixer}

Fields Summary
Constructors Summary
Methods Summary
public voidtestInitialWrite()

        File dir = getContext().getDir("testInitialWrite", Context.MODE_PRIVATE);
        File file = File.createTempFile("testInitialWrite", "dat", dir);
        file.deleteOnExit();
        assertEquals(0, FileUtils.readTextFile(file, 0, null).length());

        // The constructor has the side effect of writing to file
        new EntropyMixer(getContext(), "/dev/null", file.getCanonicalPath(), "/dev/null");

        assertTrue(FileUtils.readTextFile(file, 0, null).length() > 0);