This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 5f268794 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Fixing Tests

parent 14596c3f
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
Showing
with 125 additions and 9 deletions
......@@ -48,7 +48,7 @@ public class GitLabServiceIT {
@Test
public void getREADMEmd() throws GitLabApiException, IOException {
final InputStream repositoryFile = gitlabService.getRepositoryFile(new ExerciseId("3", null), "README.md");
final InputStream repositoryFile = gitlabService.getRepositoryFile(new ExerciseId("272", null), "README.md");
Assert.assertNotNull(repositoryFile);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
......
......@@ -43,9 +43,11 @@ public class PluginManagerActionIT {
ActionWrapper actionWrapper = config.getActions().get("someId");
Assert.assertTrue("metaData1 should be applicable",
Assert.assertTrue("metaData 1 should be applicable",
actionWrapper.isApplicable(readTestResults("metadata/1/metaData.yaml")));
Assert.assertFalse("metaData2 should not be applicable",
Assert.assertTrue("metaData 272 should be applicable",
actionWrapper.isApplicable(readTestResults("metadata/272/metaData.yaml")));
Assert.assertFalse("metaData 2 should not be applicable",
actionWrapper.isApplicable(readTestResults("metadata/2/metaData.yaml")));
}
......
......@@ -43,7 +43,7 @@ public class ExerciseResourceIT {
@Test
public void getREADME() throws Exception {
String exerciseId = "3"; // warning: this depends on the sequence in the current search index :-(
String exerciseId = "272"; // warning: this depends on the sequence in the current search index :-(
restExerciseMockMvc.perform(get("/api/exercise/"+exerciseId).param("filePath", "README.md")
.with(csrf().asHeader())
.contentType(MediaType.APPLICATION_JSON))
......@@ -57,7 +57,7 @@ public class ExerciseResourceIT {
@Test
public void getExercisemd() throws Exception {
String exerciseId = "3"; // warning: this depends on the sequence in the current search index :-(
String exerciseId = "272"; // warning: this depends on the sequence in the current search index :-(
restExerciseMockMvc.perform(get("/api/exercise/"+exerciseId).param("filePath", "exercise.md")
.with(csrf().asHeader())
.contentType(MediaType.APPLICATION_JSON))
......@@ -70,7 +70,7 @@ public class ExerciseResourceIT {
@Test
public void getNestedPath() throws Exception {
String exerciseId = "3"; // warning: this depends on the sequence in the current search index :-(
String exerciseId = "272"; // warning: this depends on the sequence in the current search index :-(
restExerciseMockMvc.perform(get("/api/exercise/"+exerciseId).param("filePath", "solution/src/at/ac/uibk/ac/artemis/Receiver.java")
.with(csrf().asHeader())
.contentType(MediaType.APPLICATION_JSON))
......@@ -82,7 +82,7 @@ public class ExerciseResourceIT {
@Test
public void getSplitPath() throws Exception {
String exerciseId = "3:solution/src/at"; // warning: this depends on the sequence in the current search index :-(
String exerciseId = "272:solution/src/at"; // warning: this depends on the sequence in the current search index :-(
restExerciseMockMvc.perform(get("/api/exercise/"+exerciseId).param("filePath", "ac/uibk/ac/artemis/Receiver.java")
.with(csrf().asHeader())
.contentType(MediaType.APPLICATION_JSON))
......
......@@ -130,7 +130,7 @@ public class PluginInterfaceResourceIT {
.andExpect(TestUtil.testResult(org.codeability.sharing.plugins.api.search.SearchResultsDTO.class,
result -> {
// not really a good test :-(
assertTrue("Currently only one public result", result.getSearchResult().size() == 3);
assertTrue("Currently some public result", result.getSearchResult().size() >= 3);
// result.getSearchResult().forEach(r -> r.getProject()..getNamespace());
}));
}
......
metadataVersion: "0.2"
type: collection
collectionContent:
- src/if-001/if-001.yml
- src/if-002/if-002.yml
- src/if-003/if-003.yml
identifier: javaCourseTUWienTest
structure: hierarchical # one from atomic, networked, hierarchical, linear
version: "1.0" # just a version tag
status: final # one fo draft, final, revised, unavalable
title: Meta Test Data 76
description: "Dies sind Teile des Einführungskurses an der TU Wien.
Momentan hier genutzt zum Testen der Metadateninfrastruktur. Version 1.xxx
3. Zeile"
programmingLanguage:
- JAVA
language: [de]
educationLevel: "Anfänger, (to be detailed)"
audience: "Anfaenger"
keyword: [Java, IOTest, latex, testing76]
license: MIT # mandatory
creator:
- {name: "Stefan Podlipnig", affiliation: "TU Wien", email: "stefan.podlipnig@tuwien.ac.at"}
contributor:
- {name: "Daniel Bastta", affiliation: "TU Wien", email: "daniel.bastta@tuwien.ac.at"}
- {name: "Andreas Merckel", affiliation: "TU Wien", email: "andreas.merkel@tuwien.ac.at"}
- {name: "Kerstin Limbeck", affiliation: "TU Wien", email: "kerstin.limbeck@tuwien.ac.at"}
publisher:
- {name: "Andreas Merckel", affiliation: "TU Wien", email: "andreas.merkel@tuwien.ac.at"}
format: [latex]
deprecated: false
difficulty: simple
requires: [Java14]
image: ./courseIcon.png
project_id: 143
project_name: apiTest_76_1613574806194
namespace: sharing/health-check-tests/apiTest_76_1613574806194
main_group: sharing
sub_group: health-check-tests
url: https://sharing.codeability-austria.uibk.ac.at/sharing/health-check-tests/apitest_76_1613574806194/
visibility: public
archived: false
star_count: 0
open_issues_count: 0
forks_count: 1
last_activity_at: 2021-04-08T15:13:27.123Z
description: Just a test project
metadataVersion: "0.2"
type: "programming exercise"
programmingLanguage: [java]
language: [de]
identifier: artemisOriginalCourseAndTitle
structure: atomic # one from atomic, networked, hierarchical, linear
version: "0.1.6" # just a version tag
title: JUnit Quality Tests Exercise2 (cloned)
format:
- Artemis
description: "Dies ist ein Beispiel, wie Tests die JUnit Test Coverage testen."
status: final # one fo draft, final, revised, unavalable
keyword: ["Example", "JUnit Tests", "JUnit", "Test Coverage Tests"]
license: CC-SA-BY 4.0
creator:
- {name: "Michael Breu", affiliation: "Universität Innsbruck", email: "admin@localhost"}
publisher:
- {name: "Michael Breu", affiliation: "Universität Innsbruck", email: "michael.breu@uibk.ac.at"}
educationLevel: "Fortgeschrittene"
deprecated: false
difficulty: medium
requires: [Java8, JUnit]
project_id: 272
project_name: junit-quality-tests-exercise2
namespace: sharing/university-innsbruck/java/junit-quality-tests-exercise2
main_group: sharing
sub_group: university-innsbruck
url: https://sharing.codeability-austria.uibk.ac.at/sharing/university-innsbruck/java/junit-quality-tests-exercise2/
visibility: public
archived: false
star_count: 0
open_issues_count: 0
forks_count: 1
last_activity_at: 2021-04-08T15:13:27.123Z
description: Just a test project
# metadataVersion: 0.2
type: programming exercise
# format (not used here)
identifier: simpleIO
structure: atomic # one from atomic, networked, hierarchical, linear
version: "1.0" # just a version tag
status: final # one fo draft, final, revised, unavailable
title: Just another sub exercise Demo
description: Not a really good structured example.
programmingLanguage: [JAVA]
language: [de]
educationLevel: "high school" # just for demonstration
"audience": {
"@type": "EducationalAudience",
"educationalRole": "student"
}
timeRequired: 0:05:00 # [hh:mm:ss]
keyword: [Java, IOTest, artemis]
license: CC-SA-BY 4.0 # mandatory
creator:
- {name: "Breu Michael", affiliation: "University of Innsbruck", email: "c703257@uibk.ac.at"}
publisher:
- {name: "Breu Michael", affiliation: "University of Innsbruck", email: "c703257@uibk.ac.at"}
deprecated: false
difficulty: simple
source:
- "cf. cunit"
contributor:
- {name: "Manuel Seywald", affiliation: "University of Klagenfurt", email: "maseywald@edu.aau.at"}
requires: [] # empty, t.b.d. later
image: 'https://sharing-codeability.uibk.ac.at/static/CodeAbility%20Austria-Dateien/Partner_UIBK.png'
project_id: 1
project_id: 272
project_name: latex
namespace: sharing/vienna-universityof-technology/latex
main_group: sharing
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment