-
Notifications
You must be signed in to change notification settings - Fork 8
Dz2 #4
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
base: master
Are you sure you want to change the base?
Dz2 #4
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,7 @@ public class TestGroupGetUserGroupsV2 extends ApiTestBase { | |
|
|
||
| /** | ||
| * Пример теста на метод group.getUserGroupsV2 | ||
| */ | ||
|
|
||
| @Test | ||
| public void testGroupGetUserGroupsV2Example() throws ApiException { | ||
| LOGGER.info("Получим данные о группах пользвоателя с помощью метода group.getUserGroupsV2"); | ||
|
|
@@ -28,4 +28,20 @@ public void testGroupGetUserGroupsV2Example() throws ApiException { | |
| LOGGER.info("Проверим, что в ответе есть группы"); | ||
| Assert.assertFalse("Пустой список групп", CollectionUtils.isEmpty(groupGetUserGroupsV2Response.getGroups())); | ||
| } | ||
|
|
||
| * Мои тесты group.getUserGroupsV2 | ||
| */ | ||
|
|
||
| @Test | ||
| public void testGroupGetUserGroupsV2My() throws ApiException { | ||
| LOGGER.info("Получим данные о группах пользвоателя с помощью метода group.getUserGroupsV2"); | ||
| bindDefaultUserSession(); | ||
|
|
||
| GroupGetUserGroupsV2Response groupGetUserGroupsV2Response = okApi.getGroupService().getUserGroupsV2(); | ||
| LOGGER.info("Проверим, что в ответе есть группы"); | ||
| Assert.assertEquals("Совпадает userId","561744237296",groupGetUserGroupsV2Response.getGroups().get(1).getUserId()); | ||
| Assert.assertNotNull("Количество групп не 0",groupGetUserGroupsV2Response.getGroups().size()); | ||
| Assert.assertFalse("Пустой список групп",groupGetUserGroupsV2Response.getGroups().isEmpty()); | ||
| Assert.assertTrue("Содержит инофрмацию Anchor",groupGetUserGroupsV2Response.getGroups().contains(groupGetUserGroupsV2Response.getAnchor())); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Это очень странная проверка, смысл которой от меня скрыт. Ты проверяешь, что в списке групп есть служебный параметр anchor, которого в списке групп никогда не будет |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| # OK API settings | ||
| #OK API settings | ||
| api.server.url=https://api.ok.ru/fb.do | ||
| api.app.public.key= | ||
| api.app.secret.key= | ||
| api.app.public.key=CBAMKNHMEBABABABA | ||
| api.app.secret.key=1389F636CEE9435FAFDEA07F | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Секретные ключи от своего приложения лучше не палить :) |
||
|
|
||
| #User session settings | ||
| user.session.access.token= | ||
| user.session.secret.key= | ||
| user.session.access.token=tkn1Iqr1L3RuERQCROQ7w1Yk1vcDQwOvWYkSL27HlPmdpvg2eHUFWRSvCF4cGp7MLGf4j0 | ||
| user.session.secret.key=34189d0161cd7e013c3a37640b0fc76c | ||
|
|
||
| # HttpClient settings | ||
| #HttpClient settings | ||
| http.client.timeout=15000 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Что-то ты не то закоммитила. Тесты где? :) |
||
| <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> | ||
| <output url="file://$MODULE_DIR$/target/classes" /> | ||
| <output-test url="file://$MODULE_DIR$/target/test-classes" /> | ||
| <content url="file://$MODULE_DIR$"> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> | ||
| <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> | ||
| <excludeFolder url="file://$MODULE_DIR$/target" /> | ||
| </content> | ||
| <orderEntry type="inheritedJdk" /> | ||
| <orderEntry type="sourceFolder" forTests="false" /> | ||
| <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" /> | ||
| <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-all:1.3" level="project" /> | ||
| <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-context:4.1.5.RELEASE" level="project" /> | ||
| <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-aop:4.1.5.RELEASE" level="project" /> | ||
| <orderEntry type="library" scope="TEST" name="Maven: aopalliance:aopalliance:1.0" level="project" /> | ||
| <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-beans:4.1.5.RELEASE" level="project" /> | ||
| <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-core:4.1.5.RELEASE" level="project" /> | ||
| <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-expression:4.1.5.RELEASE" level="project" /> | ||
| <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:4.1.5.RELEASE" level="project" /> | ||
| <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.3.1" level="project" /> | ||
| <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" /> | ||
| <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.4.1" level="project" /> | ||
| <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.1" level="project" /> | ||
| <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" /> | ||
| <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" /> | ||
| <orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.2" level="project" /> | ||
| </component> | ||
| </module> | ||
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.
size коллекции не может быть null.
Можно саму коллекцию проверить на то, что она не null