use of de.tum.in.www1.artemis.domain.participation.Participation in project ArTEMiS by ls1intum.
the class GitServiceIntTest method testListFiles.
@Test
public void testListFiles() throws IOException, GitAPIException {
Participation participation = new Participation();
participation.setRepositoryUrl(remoteTestRepo);
Repository repo = gitService.getOrCheckoutRepository(participation);
Collection<de.tum.in.www1.artemis.domain.File> files = gitService.listFiles(repo);
assertThat(files.size()).isGreaterThan(0);
gitService.deleteLocalRepository(repo);
}
use of de.tum.in.www1.artemis.domain.participation.Participation in project ArTEMiS by ls1intum.
the class LtiServiceIntTest method assertThatUnsuccessfulResultWithoutTextReturnsZeroScore.
@Test
public void assertThatUnsuccessfulResultWithoutTextReturnsZeroScore() {
Participation participation = new Participation();
participationRepository.save(participation);
Result result = new Result();
result.setParticipation(participation);
result.setSuccessful(false);
resultRepository.save(result);
// String score = ltiService.getScoreForParticipation(participation);
// assertThat(score).isEqualTo("0.00");
// cleanup
resultRepository.delete(result);
participationRepository.delete(participation);
}
use of de.tum.in.www1.artemis.domain.participation.Participation in project ArTEMiS by ls1intum.
the class LtiServiceIntTest method assertThatSuccessfulResultReturnsFullScore.
@Test
public void assertThatSuccessfulResultReturnsFullScore() {
Participation participation = new Participation();
participationRepository.save(participation);
Result result = new Result();
result.setParticipation(participation);
result.setSuccessful(true);
resultRepository.save(result);
// String score = ltiService.getScoreForParticipation(participation);
// assertThat(score).isEqualTo("1.00");
// cleanup
resultRepository.delete(result);
participationRepository.delete(participation);
}
use of de.tum.in.www1.artemis.domain.participation.Participation in project ArTEMiS by ls1intum.
the class LtiServiceIntTest method assertThatNoResultReturnsZeroScore.
@Test
public void assertThatNoResultReturnsZeroScore() {
Participation participation = new Participation();
participationRepository.save(participation);
// String score = ltiService.getScoreForParticipation(participation);
// assertThat(score).isEqualTo("0.00");
// cleanup
participationRepository.delete(participation);
}
use of de.tum.in.www1.artemis.domain.participation.Participation in project ArTEMiS by ls1intum.
the class LtiServiceIntTest method assertThatUnsuccessfulResultWith2of3FailedTestsReturnsCorrectScore.
@Test
public void assertThatUnsuccessfulResultWith2of3FailedTestsReturnsCorrectScore() {
Participation participation = new Participation();
participationRepository.save(participation);
Result result = new Result();
result.setParticipation(participation);
result.setSuccessful(false);
result.setResultString("2 of 3 failed");
resultRepository.save(result);
// String score = ltiService.getScoreForParticipation(participation);
// assertThat(score).isEqualTo("0.33");
// cleanup
resultRepository.delete(result);
participationRepository.delete(participation);
}
Aggregations