-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add tests for Goal #217
Add tests for Goal #217
Conversation
Codecov Report
@@ Coverage Diff @@
## master #217 +/- ##
============================================
+ Coverage 60.82% 61.06% +0.23%
- Complexity 716 722 +6
============================================
Files 135 135
Lines 2943 2943
Branches 324 324
============================================
+ Hits 1790 1797 +7
+ Misses 1025 1019 -6
+ Partials 128 127 -1
Continue to review full report at Codecov.
|
How did u manage to solve the error ah? |
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.
lgtm!
|
||
public class GoalTest { | ||
|
||
private static final List<String> VALID_WEEK_INPUTS = Arrays.stream(new String[]{ |
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.
Arrays.asList(new String[] {"w", "week", "weekly"})
shorter line to convert to List
|
||
@Test | ||
public void goal_emptyGoal_success() { | ||
assertEquals(new Goal(Goal.Frequency.NONE), new Goal()); |
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.
Use static import for the whole file, will be more readable
|
||
@Test | ||
public void goal_getFrequency_success() { | ||
assertEquals(Goal.Frequency.NONE, new Goal(Goal.Frequency.NONE).getFrequency()); |
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 should test something other than NONE
since the default value is NONE
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class EmailTest { |
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.
Why are we removing this? This seems valid.
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.
My bad this was unintended thanks for catching it.
I was working on a out of date branch and was making use of |
Ohh ok |
No description provided.