-
Notifications
You must be signed in to change notification settings - Fork 393
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
Adding unit test for FeatureHistory #71
Conversation
gokulsfdc
commented
Aug 20, 2018
- Added unit tests for FeatureHistory class
Codecov Report
@@ Coverage Diff @@
## master #71 +/- ##
==========================================
+ Coverage 86.11% 86.34% +0.23%
==========================================
Files 298 298
Lines 9305 9762 +457
Branches 303 531 +228
==========================================
+ Hits 8013 8429 +416
- Misses 1292 1333 +41
Continue to review full report at Codecov.
|
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! See some minor comments.
val stage1 = "stage1" | ||
val stage2 = "stage2" | ||
|
||
Spec(FeatureHistory.getClass) should "convert a feature history to metadata" in { |
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.
Since there is an actual class you can do: Spec[FeatureHistory] instead
} | ||
|
||
it should "merge two featurehistory" in { | ||
val featureHistory1 = FeatureHistory(originFeatures = Seq(feature1), stages = Seq(stage1)) |
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.
No need to repeat featurehistory in the test name. Simply "merge two instances"
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.
Same in other tests @gokulsfdc
val featureHistory1 = FeatureHistory(originFeatures = Seq(feature1), stages = Seq(stage1)) | ||
val featureHistory2 = FeatureHistory(originFeatures = Seq(feature2), stages = Seq(stage2)) | ||
|
||
val map = Map[String, FeatureHistory](("1" -> featureHistory1), ("2" -> featureHistory2)) |
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.
No need to specify map type.
Please remove “featurehistory” from test names. |
5c5cebb
to
9417a10
Compare