more on dependency injection
May. 2nd, 2014 10:34 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Looking in the direction of frp, I'm afraid.
See, you have, say, a test. The sut you are testing has some component injected, e.g.
and you sure want to make this
- Introduce a variable, which you change? The thing is, Scala tests use to run in parallel unless told otherwise. -- Make sut a function?
Just asking. A good answer may be kind of disruptive, as they say here in the Bay Area.
See, you have, say, a test. The sut you are testing has some component injected, e.g.
val sut = new FileUploader {
override def userAgent = behaveDifferentlyOnDifferentOccasions
}
def behaveDifferentlyOnDifferentOccasions = ???
and you sure want to make this
behaveDifferentlyOnDifferentOccasions
depend on test cases, right? So, what options do you have? - Introduce a variable, which you change? The thing is, Scala tests use to run in parallel unless told otherwise. -- Make sut a function?
Just asking. A good answer may be kind of disruptive, as they say here in the Bay Area.
no subject
Date: 2014-05-02 05:42 pm (UTC)no subject
Date: 2014-05-02 05:43 pm (UTC)no subject
Date: 2014-05-03 02:07 am (UTC)