package de.ugoe.cs.swe.exercises.tests;

import org.junit.Before;
import org.junit.Test;

import de.ugoe.cs.swe.exercises.exercise.ExerciseSVN;
import de.ugoe.cs.swe.exercises.exercisesheet.ExerciseSheet;
import de.ugoe.cs.swe.exercises.lecture.Lecture;
import de.ugoe.cs.swe.exercises.lectureevent.LectureEvent;
import de.ugoe.cs.swe.exercises.misc.Model;

public class ExerciseSVNTest extends BaseTest{

	@Before
	public void setUp() throws Exception {
		Model.getConnection(true);
		ExerciseSVN.SVNCheckout();
		Model.flushTables();
	}

	@Test
	public void testSVNCheckout() {
		Lecture informatik = new Lecture("Informatik I");
		informatik.save();
		LectureEvent infoEvent = new LectureEvent(2009, LectureEvent.SS,
				informatik);
		infoEvent.save();

		
		ExerciseSheet sheet = new ExerciseSheet(1, 1, 5, false, infoEvent,5);
		sheet.save();
		
		ExerciseSVN.SVNCheckout(sheet.returnMaxRevision());
	}




}
