-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/#3 노션 API 테스트 #4
Conversation
This reverts commit 6f3aea3.
private final String TOKEN = ""; | ||
private final String DATABASE_ID = ""; | ||
private final String tableName = "MEMBER PROFILE"; | ||
private final int memberNum = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memberNum은 회원 수를 말하는 거죠?? 테스트 용으로 임의로 3명으로 지정해 놓은 변수로 이해하면 될까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네넵 맞습니다!
//then | ||
assertThat(simpleQueryResultPage.results.size()).isEqualTo(1); | ||
// System.out.println("simpleQueryResultPage = " + simpleQueryResultPage.results.get(0).getPropertyValues()); | ||
assertThat(simpleQueryResultPage.results.get(0).getPropertyValues().toString().contains(email)).isEqualTo(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
equals 써서 바로 string 비교할 수도 있지 않나요? 호옥시 contains.equals(true)로 한 이유가 있을까요?? 저도 잘 몰라서 질문 드려용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simpleQueryResultPage.results.get(0).getPropertyValues()
-> 이렇게 하면 사용자 이름, 이메일, 역할에 관한 정보가 들어가 있긴 한데
bold=false, italic=false, strikethrough=false, underline=false 이런 정보들도 같이 나와서 contains 사용했습니다.
simpleQueryResultPage.results.get(0).getPropertyValues().get(0).getValue()
-> 하면 이메일 정보만 따로 나오긴 하는데 여기에도 다른 정보들도 같이 나와서 일단 저렇게 작성해뒀습니다.
- 원하는 email, name, role 값만 꺼내려는데 잘 안돼서 contains 사용했는데 고칠 필요가 있을 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
실제 사용하는 과정에서는 파싱해서 email, name, role만 따로 가져올 필요가 있겠네요.
답변 감사합니다!
What is the PR?
Changes
Test Check List
etc