package me.teaisaweso.client;

import junit.framework.Assert;
import junit.framework.TestCase;
import me.teaisaweso.client.graphmanagers.GraphManager2d;
import me.teaisaweso.client.graphmanagers.GraphManager2dFactory;
import me.teaisaweso.shared.Graph;
import me.teaisaweso.shared.Vertex;

/**
 * NOTE: this class relies on the GraphManager2d factory working, if it isn't
 * you should probably assume that this test is totally broken
 */
public class GraphManager2dTest extends TestCase {
	private GraphManager2d mManager;

	public void setUp() {
		mManager = GraphManager2dFactory.getInstance().makeDefaultGraphManager();
	}

	public void testAddVertex() {
		mManager.addVertex(new Vertex("hi"), 0, 0, 10);
		Graph underlying = mManager.getUnderlyingGraph();
		Assert.assertEquals(true, underlying.getVertices().contains(new Vertex("hi")));
	}
}

package me.teaisaweso.client;

import junit.framework.Assert;
import junit.framework.TestCase;
import me.teaisaweso.client.graphmanagers.GraphManager2d;
import me.teaisaweso.client.graphmanagers.GraphManager2dFactory;
import me.teaisaweso.shared.Graph;
import me.teaisaweso.shared.Vertex;

/**
 * NOTE: this class relies on the GraphManager2d factory working, if it isn't
 * you should probably assume that this test is totally broken
 */
public class GraphManager2dTest extends TestCase {
	private GraphManager2d mManager;

	/**
	 * runs test setup, creates a graphmanager instance
	 */
	public void setUp() {
		mManager = GraphManager2dFactory.getInstance().makeDefaultGraphManager();
	}

	/**
	 * tests that adding vertices works
	 */
	public void testAddVertex() {
		mManager.addVertex(new Vertex("hi"), 0, 0, 10);
		Graph underlying = mManager.getUnderlyingGraph();
		Assert.assertEquals(true, underlying.getVertices().contains(new Vertex("hi")));
	}
}

add some docstrings to the graphmanager2d test