-
Notifications
You must be signed in to change notification settings - Fork 39
Issue-12- Statements resolved #40
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: main
Are you sure you want to change the base?
Conversation
Added Statements.java
Added StatementsTest.java
| public class StatementsTest { | ||
| private Statements object = new Statements(); | ||
|
|
||
| @Test |
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.
you havent imported the Test annotation class from JUnit
|
@Aarushi5g we have updated the environment setting. Please re-run the pipeline |
|
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>
.
|
fengyuanyang
left a comment
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.
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(); |
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.
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); |
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.
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.
|
Please accept my pull request!!! |
|
I've tried my best 👍 |
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 👍