ZCH-18 bookmarks 返回的对象应该是 Array

This commit is contained in:
YuCheng Hu 2023-10-04 08:20:53 -04:00
parent dc223754fc
commit c7b11d27fe
2 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ public class TopicServiceTest extends TestBase {
Optional<Topic> topic = topicsService.getTopic(DISCOURSE_TOPIC_ID); Optional<Topic> topic = topicsService.getTopic(DISCOURSE_TOPIC_ID);
assertThat(topic).isNotEmpty(); assertThat(topic).isNotEmpty();
assertThat(topic.get().getPostStream().getPosts().size()).isGreaterThan(1); assertThat(topic.get().getPostStream().getPosts().size()).isGreaterThan(0);
assertThat(topic.get().getPostStream().getPosts().get(0).getId()).isEqualTo(DISCOURSE_POST_ID); assertThat(topic.get().getPostStream().getPosts().get(0).getId()).isEqualTo(DISCOURSE_POST_ID);
assertThat(topic.get().getId()).isEqualTo(DISCOURSE_TOPIC_ID); assertThat(topic.get().getId()).isEqualTo(DISCOURSE_TOPIC_ID);
assertThat(topic.get().getTitle()).isNotEmpty(); assertThat(topic.get().getTitle()).isNotEmpty();

View File

@ -47,7 +47,7 @@ public class Topic {
private List<ActionsSummary> actionsSummary; private List<ActionsSummary> actionsSummary;
private Integer chunkSize; private Integer chunkSize;
private Boolean bookmarked; private Boolean bookmarked;
private String bookmarks; private List<String> bookmarks;
private String topicTimer; private String topicTimer;
private Long messageBus_LastId; private Long messageBus_LastId;
private Integer participantCount; private Integer participantCount;
@ -369,11 +369,11 @@ public class Topic {
this.bookmarked = bookmarked; this.bookmarked = bookmarked;
} }
public String getBookmarks() { public List<String> getBookmarks() {
return bookmarks; return bookmarks;
} }
public void setBookmarks(String bookmarks) { public void setBookmarks(List<String> bookmarks) {
this.bookmarks = bookmarks; this.bookmarks = bookmarks;
} }