Skip to content

Commit d85b5a6

Browse files
committed
874: Update comments
1 parent c2caa75 commit d85b5a6

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/main/java/org/patinanetwork/codebloom/common/db/repos/question/topic/QuestionTopicRepository.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public interface QuestionTopicRepository {
2020
* @param questionTopic - required fields:
2121
* <ul>
2222
* <li>questionId
23+
* <li>topicTag
2324
* <li>topic
2425
* <li>topicSlug
2526
* </ul>
@@ -31,6 +32,7 @@ public interface QuestionTopicRepository {
3132
* @param questionTopic - overridden fields:
3233
* <ul>
3334
* <li>questionId
35+
* <li>topicTag
3436
* <li>topic
3537
* <li>topicSlug
3638
* </ul>

src/main/java/org/patinanetwork/codebloom/common/db/repos/question/topic/QuestionTopicSqlRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public Optional<QuestionTopic> findQuestionTopicByQuestionIdAndTopicEnum(
132132

133133
return Optional.empty();
134134
} catch (Exception e) {
135-
throw new RuntimeException("Failed to get question topic by question ID and topic enum", e);
135+
throw new RuntimeException("Failed to get question topic by ID", e);
136136
}
137137
}
138138

@@ -210,7 +210,7 @@ public boolean deleteQuestionTopicById(final String id) {
210210
stmt.setObject("id", UUID.fromString(id));
211211
return stmt.executeUpdate() > 0;
212212
} catch (SQLException e) {
213-
throw new RuntimeException("Failed to delete question topic by ID", e);
213+
throw new RuntimeException("Failed to delete tag by tag ID", e);
214214
}
215215
}
216216
}

src/test/java/org/patinanetwork/codebloom/common/db/repos/question/topic/QuestionTopicRepositoryTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void cleanUp() {
5959
boolean isSuccessful = questionTopicRepository.deleteQuestionTopicById(testQuestionTopic.getId())
6060
&& questionTopicRepository.deleteQuestionTopicById(testQuestionBankTopic.getId());
6161
if (!isSuccessful) {
62-
fail("Failed to delete test question topics");
62+
fail("Failed to delete test question");
6363
}
6464
}
6565

@@ -74,7 +74,7 @@ void testFindQuestionTopicById() {
7474
if (!possibleQuestionTopic.get().equals(testQuestionTopic)) {
7575
log.info("possibleQuestionTopic: {}", possibleQuestionTopic.get());
7676
log.info("testQuestionTopic: {}", testQuestionTopic);
77-
fail("testFindQuestionTopicById failed: possibleQuestionTopic does not equal testQuestionTopic");
77+
fail("testFindQuestionTopicById failed: possibleQuestionTopic does not equal to testQuestionTopic");
7878
}
7979
}
8080

@@ -91,7 +91,7 @@ void testFindQuestionTopicByQuestionIdAndTopicEnum() {
9191
log.info("possibleQuestionTopic: {}", possibleQuestionTopic.get());
9292
log.info("testQuestionTopic: {}", testQuestionTopic);
9393
fail(
94-
"testFindQuestionTopicByQuestionIdAndTopicEnum failed: possibleQuestionTopic does not equal testQuestionTopic");
94+
"testFindQuestionTopicByQuestionIdAndTopicEnum failed: possibleQuestionTopic does not equal to testQuestionTopic");
9595
}
9696
}
9797

@@ -129,7 +129,7 @@ void testUpdateQuestion() {
129129
if (!newQuestionTopic.get().equals(testQuestionTopic)) {
130130
log.info("newQuestionTopic: {}", newQuestionTopic.get());
131131
log.info("testQuestionTopic: {}", testQuestionTopic);
132-
fail("testUpdateQuestion failed: newQuestionTopic does not equal testQuestionTopic");
132+
fail("testUpdateQuestion failed: newQuestionTopic does not equal to testQuestionTopic");
133133
}
134134
}
135135

0 commit comments

Comments
 (0)