Created Calculator class and calculate method in SimpleCalculator interface#290
Open
dandalb wants to merge 6 commits into
Open
Created Calculator class and calculate method in SimpleCalculator interface#290dandalb wants to merge 6 commits into
dandalb wants to merge 6 commits into
Conversation
Nazar-Hetun
reviewed
Sep 14, 2021
Comment on lines
+22
to
+25
| @BeforeEach | ||
| void setUp() { | ||
| calculator = new Calculator(); | ||
| } |
There was a problem hiding this comment.
краще використати @BeforeAll , так як нам цей обєкт достатньо 1 раз оголосити
Nazar-Hetun
approved these changes
Sep 14, 2021
| import org.junit.jupiter.api.Test; | ||
|
|
||
| class CalculatorTest { | ||
| private static final double A_POSITIVE = 1.23; |
Contributor
There was a problem hiding this comment.
Suggested change
| private static final double A_POSITIVE = 1.23; | |
| private static final double FIRST_POSITIVE_OPERAND = 1.23; |
| @Test | ||
| void calculate_additionPositiveOperands_Ok() { | ||
| double actual = calculator.calculate(A_POSITIVE, B_POSITIVE, ADDITION); | ||
| double expected = A_POSITIVE + B_POSITIVE; |
Contributor
There was a problem hiding this comment.
expected should not be calculated in runtime
| } | ||
|
|
||
| @Test | ||
| void calculate_exponentiationZero_Ok() { |
Contributor
There was a problem hiding this comment.
what about zeroToNegativePower?
Max-Pochepets
approved these changes
Sep 14, 2021
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.
No description provided.