<NME> GCBase.java
<BEF> ADDFILE
<MSG> Merge pull request #318 from blafoo/unittest

First version of unittests
<DFF> @@ -0,0 +1,43 @@
+package cgeo.geocaching.test.mock;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import cgeo.geocaching.ICache;
+import cgeo.geocaching.cgBase;
+
+public abstract class GCBase implements ICache {
+
+	/* 
+	 * The data for the caches can be generated by entering the url
+	 * http://www.geocaching.com/seek/cache_details.aspx?log=y&wp=GCxxxx&numlogs=35&decrypt=y
+	 * into a browser and saving the file 
+	 */
+	@Override
+	public String getData() {
+		try {
+			InputStream is = this.getClass().getResourceAsStream("/cgeo/geocaching/test/mock/"+getGeocode()+".html");
+			ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+
+			int nRead;
+			byte[] data = new byte[16384];
+
+			while ((nRead = is.read(data, 0, data.length)) != -1) {
+				buffer.write(data, 0, nRead);
+			}
+
+			buffer.flush();
+			StringBuffer sb = new StringBuffer(buffer.toString());
+			cgBase.replaceWhitespace(sb);
+			return sb.toString();
+
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return null;
+		
+	}
+
+
+}

Merge pull request #318 from blafoo/unittest