/* $Id: PlainDatabaseTest.java 6 2010-06-17 19:46:16Z sj1981 $
*
* This file is part of the TANman application for Android.
* http://code.google.com/p/tanman-android/
*
* Copyright 2010 Sven Jacobs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.svenjacobs.tanman.core;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.junit.Ignore;
import org.junit.Test;
public class PlainDatabaseTest extends DatabaseTest {
private static final String FILENAME = "/tmp/test.tdb";
@Ignore
@Test
public void write() throws DatabaseWriteException, IOException {
final DatabaseWriter writer = new PlainDatabaseWriter();
final OutputStream output = new FileOutputStream( FILENAME );
writer.write( getDummyDatabase(), output );
output.close();
}
@Ignore
@Test
public void read() throws DatabaseReadException, IOException {
final DatabaseReader reader = new PlainDatabaseReader();
final InputStream input = new FileInputStream( FILENAME );
final Database db = reader.read( input );
input.close();
testDatabase( db );
}
}
|