https://kotlinlang.org logo
#android
Title
# android
g

gildor

07/11/2017, 7:32 AM
Alt+Enter (fastfix) on your class/method -> Create test
b

budioktaviyan

07/11/2017, 8:06 AM
it is just create a Java Unit Test, I mean a Kotlin Unit Test
g

gildor

07/11/2017, 8:20 AM
It creates Unit test on the same language as an original file. Anyway, you can convert Java class to Kotlin in one second
b

budioktaviyan

07/11/2017, 8:25 AM
Yeah, I know it. I can convert that. but, my question is I want to call a shortcut just like create a Unit Test in Java
as simple as when you create a unit test from java class
g

gildor

07/11/2017, 8:30 AM
I don’t understand
How do you create unit test in java?
b

budioktaviyan

07/11/2017, 8:31 AM
same shortcut like
alt+enter
but, suddenly you can’t do that if your class in kotlin and you want to create a unit test using the same language. I’m using Android version 2.3.3 by the way
g

gildor

07/11/2017, 8:32 AM
I can do that in Kotlin file
alt+enter works only on class name, but also you can use “navigate to test” to create test on any place in file/class
b

budioktaviyan

07/11/2017, 8:37 AM
what IDE do you have ? Android or IntelliJ IDEA ? and the version is ?
g

gildor

07/11/2017, 8:38 AM
both. But I checked on Android Studio 3.0 But I think there is no difference, it’s part of Kotlin Plugin (I use 1.1.3-2 plugins)
b

budioktaviyan

07/11/2017, 8:46 AM
hmmm, ok I’ll check it. thanks man