package network;
import java.io.File;
import util.Log;
import junit.framework.TestCase;
public class MessageProcessorTest extends TestCase {
public void testAddMessage() throws Exception {
MessageProcessor processor = new MessageProcessor();
Message addMessage = new Message();
addMessage.setCommand("add");
addMessage.setFileId("testfile.txt");
addMessage.setFileContents(new File("testfile.txt"));
processor.process(addMessage, new Log());
File repositoryFile= new File("d:\\temp\\repository\\");
assertTrue(repositoryFile.exists());
}
}