use of de.tum.in.www1.artemis.domain.participation.SolutionProgrammingExerciseParticipation in project Artemis by ls1intum.
the class UrlServiceTest method testUserIndependentRepositoryUrl.
@Test
public void testUserIndependentRepositoryUrl() {
var solutionProgrammingExerciseParticipation = new SolutionProgrammingExerciseParticipation();
solutionProgrammingExerciseParticipation.setRepositoryUrl(repositoryUrl1.toString());
assertThat(solutionProgrammingExerciseParticipation.getUserIndependentRepositoryUrl()).isEqualTo("https://bitbucket.ase.in.tum.de/scm/EIST2016RME/RMEXERCISE-ab123cd");
var templateProgrammingExerciseParticipation = new TemplateProgrammingExerciseParticipation();
templateProgrammingExerciseParticipation.setRepositoryUrl(repositoryUrl2.toString());
assertThat(templateProgrammingExerciseParticipation.getUserIndependentRepositoryUrl()).isEqualTo("https://repobruegge.in.tum.de/scm/EIST2016RME/RMEXERCISE-ab123cd.git");
var studentParticipation1 = new ProgrammingExerciseStudentParticipation();
studentParticipation1.setRepositoryUrl(repositoryUrl3.toString());
assertThat(studentParticipation1.getUserIndependentRepositoryUrl()).isEqualTo("https://artemistest2gitlab.ase.in.tum.de/TESTADAPTER/testadapter-exercise.git");
var studentParticipation2 = new ProgrammingExerciseStudentParticipation();
studentParticipation2.setRepositoryUrl(repositoryUrl4.toString());
assertThat(studentParticipation2.getUserIndependentRepositoryUrl()).isEqualTo("https://artemistest2gitlab.ase.in.tum.de/FTCSCAGRADING1/ftcscagrading1-username");
assertThat(new ProgrammingExerciseStudentParticipation().getUserIndependentRepositoryUrl()).isNull();
var studentParticipation3 = new ProgrammingExerciseStudentParticipation();
studentParticipation3.setRepositoryUrl("http://localhost:8080/Assignment/rest/words/{name}/protection");
assertThat(studentParticipation3.getUserIndependentRepositoryUrl()).isNull();
}
Aggregations