dave08
03/30/2020, 1:28 PMdata class Something(val somethingElse: SomethingElse, val andAnotherOne: AndAnotherOne)
val something = Something(SomethingElse(), somethingElse.anotherOne)
is there any reason why not (I mean being able to access the first val when initializing the second)? Why shouldn't this be like a regular `val`s inside the class?Michael de Kaste
03/30/2020, 1:29 PMval something = SomethingElse().let{ Something(it, it.anotherOne)}
this?Michael de Kaste
03/30/2020, 1:30 PMMichael de Kaste
03/30/2020, 1:32 PMdata class Something(val somethingElse: String, val andAnotherOne: Int){
constructor(somethingElse: String) : this(somethingElse, somethingElse.length)
}
val something = Something(String())
like thisdave08
03/30/2020, 1:34 PMSomethingElse
isn't available yet... I was just wondering why?Michael de Kaste
03/30/2020, 1:34 PMdave08
03/30/2020, 1:36 PMdata class Fixture(
val depOne: DepOne = mockk(),
val subject: SUTClass = SUTClass(depOne)
)
dave08
03/30/2020, 1:37 PMAdam Powell
03/30/2020, 1:38 PMdave08
03/30/2020, 1:39 PMdave08
03/30/2020, 1:42 PMinvoke
call...dave08
03/30/2020, 1:42 PMAdam Powell
03/30/2020, 1:52 PM