package edu.oregonstate.cope.eclipse;

import edu.oregonstate.cope.clientRecorder.ClientRecorder;
import edu.oregonstate.cope.clientRecorder.Events;

public class MockRecorder extends ClientRecorder {
	
	public Events recordedEvent;
	public String recordedText = "bob";
	public int recordedOffset = 1000000;
	public int recordedLength = 10000000;
	public String recordedSourceFile = "nothing";
	public String recordedChangeOrigin = "somebody else";

	@Override
	public void recordTextChange(String text, int offset, int length, String sourceFile, String changeOrigin) {
		recordedEvent = Events.textChange;
		recordedText = text;
		recordedOffset = offset;
		recordedLength = length;
		recordedSourceFile = sourceFile;
		recordedChangeOrigin = changeOrigin;
	}

	@Override
	public void recordCopy(String entityAddress, int offset, int lenght, String copiedText) {
		recordedEvent = Events.copy;
		recordedSourceFile = entityAddress;
		recordedOffset = offset;
		recordedLength = lenght;
		recordedText = copiedText;
	}
}

@@ -32,16 +32,76 @@
 lipse;%0A%0A
+import edu.oregonstate.cope.clientRecorder.ChangePersister;%0A
 import e
@@ -256,16 +256,91 @@
 der %7B%0A%09%0A
+%09public MockRecorder(ChangePersister changePersister) %7B%0A%09%09super(null);%0A%09%7D%0A%0A
 %09public 

Update test