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

Added tests cases for OneMethodCreatesLambda #542

Closed
wants to merge 3 commits into from
Closed

Added tests cases for OneMethodCreatesLambda #542

wants to merge 3 commits into from

Conversation

LaithAlebrahim
Copy link
Contributor

I added some tests cases senarios for the doSomething method

@LaithAlebrahim
Copy link
Contributor Author

LaithAlebrahim commented Mar 1, 2024

@yegor256 can you please review it and let me know if you have any question or concerns about it
This the link for the issue Issue 501

@yegor256
Copy link
Member

yegor256 commented Mar 1, 2024

@LaithAlebrahim thanks for your contribution, but I think that test classes should be kept in src/test/java, instead of src/test/resources

@LaithAlebrahim
Copy link
Contributor Author

@yegor256 I did that just to keep the test in same folder as the class if you want I'll move it to the src/test/java

@LaithAlebrahim thanks for your contribution, but I think that test classes should be kept in src/test/java, instead of src/test/resources

@yegor256
Copy link
Member

yegor256 commented Mar 1, 2024

@LaithAlebrahim we keep all tests in src/test/java. Otherwise they just won't run. Also, the files in srt/test/resources are NOT supposed to be tests. They are not a runnable classes.

@LaithAlebrahim
Copy link
Contributor Author

@LaithAlebrahim we keep all tests in src/test/java. Otherwise they just won't run. Also, the files in srt/test/resources are NOT supposed to be tests. They are not a runnable classes.

@yegor256 Yeah I see, But the class OneMethodCreatesLambda is in src/tests/resources/org/jpeek/samples so should I write tests for it as it's written in the issue or what ,Could you guide me of what am supposing to do )

@LaithAlebrahim
Copy link
Contributor Author

@yegor256 Should I move the class OneMethodCreatesLambda to the folder src/test/java/org/jpeek/samples after creating samples folder then put the class OneMethodCreatesLambdaTest with other tests

@LaithAlebrahim
Copy link
Contributor Author

Hi@yegor256 , did you review the changes is that what requried for the task

@yegor256
Copy link
Member

yegor256 commented Mar 5, 2024

@LaithAlebrahim currently, this PR looks pretty strange. If you are adding new tests to a class, why do you add the class itself? Just create a test file for existing Java class.

@LaithAlebrahim
Copy link
Contributor Author

@yegor256 Actually because this issue require to test a class that exist in resourcses folder so I did not know what I should do with the class itself cuz I could not import it from folder that has the tests cases that's why I added it there to test the method

@yegor256
Copy link
Member

yegor256 commented Mar 5, 2024

@LaithAlebrahim I believe, you misunderstood the description of the puzzle. It is expected that you test the result of TLCOM.xsl after it parses OneMethodCreatesLambda.java class. We don't need to create a unit test for OneMethodCreatesLambda.java, since it's not a production class, just a resource for testing of XSL transformations.

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