Open
Conversation
Added Statements.java
Added StatementsTest.java
januslinhc
reviewed
Oct 14, 2020
| public class StatementsTest { | ||
| private Statements object = new Statements(); | ||
|
|
||
| @Test |
Contributor
There was a problem hiding this comment.
you havent imported the Test annotation class from JUnit
Contributor
|
@Aarushi5g we have updated the environment setting. Please re-run the pipeline |
Author
|
Could you help me with my code if possible? :)
…On Wed, 14 Oct 2020 at 23:27, januslinhc ***@***.***> wrote:
@Aarushi5g <https://github.com/Aarushi5g> we have updated the environment
setting. Please re-run the pipeline
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#40 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM6YYHHBXFGRS6JLFDXFQHTSKXRBRANCNFSM4SQOWSLQ>
.
|
Owner
fengyuanyang
left a comment
There was a problem hiding this comment.
hi. , can you a look on it
| public void switchStatementTest() { | ||
| Scanner sc = new Scanner(System.in); | ||
| System.out.println("Enter first number: "); | ||
| Double input1 = sc.nextDouble(); |
Owner
There was a problem hiding this comment.
Hi , thanks for your contribution there.
In Unit test , please use
assertEquals to compare expect value and actual value instead of using System.out
You can have a look on other Test class.
|
|
||
| case '*': | ||
| result = number1 * number2; | ||
| System.out.print(number1 + " * " + number2 + " = " + result); |
Owner
There was a problem hiding this comment.
It's a good practice to use switch , please use return instead of using System.out
it's not able to check the value in unit test.
Author
|
Please accept my pull request!!! |
Author
|
I've tried my best 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey there!
Kindly accept my pull request on Statements in java.
P.S. All the unit tests including all the statements mentioned have been added as well in StatementsTest.java
Hope you'll approve it for Hacktoberfest :)
Thank you 👍