use of com.jetbrains.edu.learning.courseFormat.AnswerPlaceholderSubtaskInfo in project intellij-community by JetBrains.
the class StudyStepicFormatTest method doStepOptionsCreationTest.
private static StepicWrappers.StepOptions doStepOptionsCreationTest(String fileName) throws IOException {
String responseString = FileUtil.loadFile(new File(getTestDataPath(), fileName));
StepicWrappers.StepSource stepSource = EduStepicClient.deserializeStepicResponse(StepicWrappers.StepContainer.class, responseString).steps.get(0);
StepicWrappers.StepOptions options = stepSource.block.options;
List<TaskFile> files = options.files;
assertTrue("Wrong number of task files", files.size() == 1);
List<AnswerPlaceholder> placeholders = files.get(0).getAnswerPlaceholders();
assertTrue("Wrong number of placeholders", placeholders.size() == 1);
Map<Integer, AnswerPlaceholderSubtaskInfo> infos = placeholders.get(0).getSubtaskInfos();
assertNotNull(infos);
assertEquals(Collections.singletonList("Type your name here."), infos.get(0).getHints());
assertEquals("Liana", infos.get(0).getPossibleAnswer());
return options;
}
Aggregations