Skip to content
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

--test-targets param #394

Merged
merged 4 commits into from
Nov 14, 2018
Merged

--test-targets param #394

merged 4 commits into from
Nov 14, 2018

Conversation

Macarse
Copy link
Contributor

@Macarse Macarse commented Nov 14, 2018

@bootstraponline bootstraponline mentioned this pull request Nov 14, 2018
34 tasks
@Test
fun testTargets_parse() {
val cmd = AndroidRunCommand()
CommandLine(cmd).parse("--test-targets", "class com.foo.Clazz", "--test-targets", "package com.my.package")
Copy link
Contributor

@bootstraponline bootstraponline Nov 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably better to extract "class com.foo.Clazz", "--test-targets", "package com.my.package" to a variable.

I think you can make them a list and then destructure with *.

val expectedTargets = listOf("class com.foo.Clazz", "--test-targets", "package com.my.package")
...

@Test
fun androidArgs_overrideTestTargetsFromCmdLine() {
val cli = AndroidRunCommand()
CommandLine(cli).parse("--test-targets", "class com.foo.ClassName")
Copy link
Contributor

@bootstraponline bootstraponline Nov 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract "class com.foo.ClassName" to a variable

@codecov-io
Copy link

Codecov Report

Merging #394 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #394      +/-   ##
============================================
+ Coverage     79.93%   79.94%   +0.01%     
- Complexity      479      480       +1     
============================================
  Files            66       66              
  Lines          1550     1551       +1     
  Branches        234      234              
============================================
+ Hits           1239     1240       +1     
  Misses          173      173              
  Partials        138      138

@Macarse Macarse merged commit 3dd8bac into master Nov 14, 2018
@bootstraponline bootstraponline deleted the macarse/issue365-test-targets branch November 14, 2018 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants