package Test;

import CTL.*;
import ReflWrap.*;

import java.io.*;
import java.util.*;
import junit.framework.*;

/** Test case for CTL.Vault */
public class TVault extends TestCase
{
	public void testSimpleVault ()
	{ 
		try
		{
			Env.newLogger("test");
			File f = File.createTempFile("CTL", null);
			LinkedList<String> moo = new LinkedList<String>();
			moo.add("blah");
			moo.add("moongoo");
			moo.add("fasel");
			Vault.write(moo, new TypeTree(LinkedList.class, String.class), f);
			LinkedList<String> moo2 = (LinkedList<String>)Vault.read(f);
			assertTrue(moo2.equals(moo));
			f.delete();
		}
		catch (Exception e)
		{
			RUtil.except(e);
		}
	}

	public static void main (String[] args)
	{ 
		TVault foo = new TVault();
		foo.testSimpleVault();
	}
}
