Search in sources :

Example 1 with PwDbHeaderOutputV3

use of com.keepassdroid.database.save.PwDbHeaderOutputV3 in project KeePassDX by Kunzisoft.

the class PwManagerOutputTest method testHeader.

public void testHeader() throws PwDbOutputException, IOException {
    ByteArrayOutputStream bActual = new ByteArrayOutputStream();
    PwDbV3Output pActual = new PwDbV3OutputDebug(mPM, bActual, true);
    PwDbHeaderV3 header = pActual.outputHeader(bActual);
    ByteArrayOutputStream bExpected = new ByteArrayOutputStream();
    PwDbHeaderOutputV3 outExpected = new PwDbHeaderOutputV3(mPM.dbHeader, bExpected);
    outExpected.output();
    assertHeadersEquals(mPM.dbHeader, header);
    assertTrue("No output", bActual.toByteArray().length > 0);
    assertArrayEquals("Header does not match.", bExpected.toByteArray(), bActual.toByteArray());
}
Also used : PwDbV3Output(com.keepassdroid.database.save.PwDbV3Output) PwDbHeaderV3(com.keepassdroid.database.PwDbHeaderV3) ByteArrayOutputStream(java.io.ByteArrayOutputStream) PwDbV3OutputDebug(com.keepassdroid.database.save.PwDbV3OutputDebug) PwDbHeaderOutputV3(com.keepassdroid.database.save.PwDbHeaderOutputV3)

Aggregations

PwDbHeaderV3 (com.keepassdroid.database.PwDbHeaderV3)1 PwDbHeaderOutputV3 (com.keepassdroid.database.save.PwDbHeaderOutputV3)1 PwDbV3Output (com.keepassdroid.database.save.PwDbV3Output)1 PwDbV3OutputDebug (com.keepassdroid.database.save.PwDbV3OutputDebug)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1