Skip to content
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

graphQL integration testing #54

Merged
merged 12 commits into from
Jun 20, 2023
Merged

graphQL integration testing #54

merged 12 commits into from
Jun 20, 2023

Conversation

eyakauleva
Copy link
Owner

No description provided.

Elizaveta Yakovleva added 9 commits June 6, 2023 18:06
# Conflicts:
#	.gitignore
# Conflicts:
#	src/main/java/com/solvd/micro9/users/domain/elasticsearch/ESearchUser.java
#	src/test/java/com/solvd/micro9/users/TestUtils.java
@eyakauleva eyakauleva self-assigned this Jun 7, 2023
@eyakauleva eyakauleva requested a review from h1alexbel June 7, 2023 14:24
@Test
void verifyUsersAreFondByCriteriaTest() {
int size = 10;
String query = "{ findByCriteria (criteria: {name: \"a\"}, size: " + size
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eyakauleva you can use formatted() from java.lang.String

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 02fd94b

import java.util.stream.IntStream;

@GraphQlTest(GraphqlUserController.class)
@Import(GraphQLITConfig.class)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eyakauleva you have naming inconsistency, I mean GraphqlUserController vs GraphQLITConfig

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 02fd94b

@Autowired
private UserProducer producer;

@Test
@SneakyThrows
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eyakauleva try-catch is bad idea in tests
it's better to use throws keyword inside your tests

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 02fd94b


@GraphQlTest(GraphqlUserController.class)
@Import(GraphQLITConfig.class)
public class GraphQLIT {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can rename this class to GraphqlUserControllerIT or GraphqlUserControllerITCase

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 02fd94b

Repository owner deleted a comment from codecov-commenter Jun 17, 2023
Repository owner deleted a comment from codecov-commenter Jun 17, 2023
}

@Test
void verifyUsersAreFondByCriteriaTest() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eyakauleva In JUnit 5, It's not necessary, to add suffix Test to the method's signature

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 83582da

Repository owner deleted a comment from codecov-commenter Jun 20, 2023
Copy link
Collaborator

@h1alexbel h1alexbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@h1alexbel h1alexbel merged commit f8745b2 into master Jun 20, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants