// Path: src/main/java/de/fhg/igd/mongomvcc/VCollection.java
// public interface VCollection {
// 	/**
// 	 * @return the collection's name
// 	 */
// 	String getName();
// 	
// 	/**
// 	 * Inserts a new object to the collection. If the object does not have
// 	 * a UID yet, a new one will be generated and saved in the object's
// 	 * <code>uid</code> attribute.
// 	 * @param obj the object to add to the collection
// 	 */
// 	void insert(Map<String, Object> obj);
// 	
// 	/**
// 	 * Deletes the object with the given UID from the collection (if it exists)
// 	 * @param uid the UID of the object to delete
// 	 */
// 	void delete(long uid);
// 	
// 	/**
// 	 * Deletes all objects from the collection that match the given example object
// 	 * @param example the example object
// 	 */
// 	void delete(Map<String, Object> example);
// 	
// 	/**
// 	 * @return a cursor which iterates over all objects in this collection
// 	 */
// 	VCursor find();
// 	
// 	/**
// 	 * Find by example. Returns all objects that match the given example.
// 	 * @param example the example object
// 	 * @return a cursor iterating over all matching objects
// 	 */
// 	VCursor find(Map<String, Object> example);
// 	
// 	/**
// 	 * Find by example. Returns all objects that match the given example, but
// 	 * only return the requested fields. Omit all other fields, thus return
// 	 * partial objects only.
// 	 * @param example the example object
// 	 * @param fields the names of the fields to return
// 	 * @return a cursor iterating over all matching objects
// 	 */
// 	VCursor find(Map<String, Object> example, String... fields);
// 	
// 	/**
// 	 * Finds an object that matches the given example
// 	 * @param example the example object
// 	 * @return the object or null if there is no such object
// 	 */
// 	Map<String, Object> findOne(Map<String, Object> example);
// }
// 
// Path: src/main/java/de/fhg/igd/mongomvcc/VCursor.java
// public interface VCursor extends Iterable<Map<String, Object>> {
// 	/**
// 	 * @return the number of database objects this cursor points to
// 	 */
// 	int size();
// }


import de.fhg.igd.mongomvcc.VCollection;
import de.fhg.igd.mongomvcc.VCursor;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
// This file is part of MongoMVCC.
//
// Copyright (c) 2012 Fraunhofer IGD
//
// MongoMVCC is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// MongoMVCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with MongoMVCC. If not, see <http://www.gnu.org/licenses/>.

package de.fhg.igd.mongomvcc.impl;





/**
 * Tests {@link MongoDBVLargeCollection}
 * @author Michel Kraemer
 */
public class MongoDBVLargeCollectionTest extends AbstractMongoDBVDatabaseTest {
	/**
	 * Tests if large objects with byte arrays/streams/buffers can be saved in the database
	 * @throws Exception if something goes wrong
	 */
	@Test
	public void largeObjectByte() throws Exception {
// Path: src/main/java/de/fhg/igd/mongomvcc/VCollection.java
// public interface VCollection {
// 	/**
// 	 * @return the collection's name
// 	 */
// 	String getName();
// 	
// 	/**
// 	 * Inserts a new object to the collection. If the object does not have
// 	 * a UID yet, a new one will be generated and saved in the object's
// 	 * <code>uid</code> attribute.
// 	 * @param obj the object to add to the collection
// 	 */
// 	void insert(Map<String, Object> obj);
// 	
// 	/**
// 	 * Deletes the object with the given UID from the collection (if it exists)
// 	 * @param uid the UID of the object to delete
// 	 */
// 	void delete(long uid);
// 	
// 	/**
// 	 * Deletes all objects from the collection that match the given example object
// 	 * @param example the example object
// 	 */
// 	void delete(Map<String, Object> example);
// 	
// 	/**
// 	 * @return a cursor which iterates over all objects in this collection
// 	 */
// 	VCursor find();
// 	
// 	/**
// 	 * Find by example. Returns all objects that match the given example.
// 	 * @param example the example object
// 	 * @return a cursor iterating over all matching objects
// 	 */
// 	VCursor find(Map<String, Object> example);
// 	
// 	/**
// 	 * Find by example. Returns all objects that match the given example, but
// 	 * only return the requested fields. Omit all other fields, thus return
// 	 * partial objects only.
// 	 * @param example the example object
// 	 * @param fields the names of the fields to return
// 	 * @return a cursor iterating over all matching objects
// 	 */
// 	VCursor find(Map<String, Object> example, String... fields);
// 	
// 	/**
// 	 * Finds an object that matches the given example
// 	 * @param example the example object
// 	 * @return the object or null if there is no such object
// 	 */
// 	Map<String, Object> findOne(Map<String, Object> example);
// }
// 
// Path: src/main/java/de/fhg/igd/mongomvcc/VCursor.java
// public interface VCursor extends Iterable<Map<String, Object>> {
// 	/**
// 	 * @return the number of database objects this cursor points to
// 	 */
// 	int size();
// }


// Path: src/test/java/de/fhg/igd/mongomvcc/impl/MongoDBVLargeCollectionTest.java
import de.fhg.igd.mongomvcc.VCollection;
import de.fhg.igd.mongomvcc.VCursor;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;

// This file is part of MongoMVCC.
//
// Copyright (c) 2012 Fraunhofer IGD
//
// MongoMVCC is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// MongoMVCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with MongoMVCC. If not, see <http://www.gnu.org/licenses/>.

package de.fhg.igd.mongomvcc.impl;





/**
 * Tests {@link MongoDBVLargeCollection}
 * @author Michel Kraemer
 */
public class MongoDBVLargeCollectionTest extends AbstractMongoDBVDatabaseTest {
	/**
	 * Tests if large objects with byte arrays/streams/buffers can be saved in the database
	 * @throws Exception if something goes wrong
	 */
	@Test
	public void largeObjectByte() throws Exception {
		VCollection coll = _master.getLargeCollection("images");