There should be a way to override the StreamBuilder instance present inside the StreamBuilderS for unit testing.
shiv4nsh opened this issue · 3 comments
There should be a way to provide the value of inner :StreamsBuilder So that the library must not create its own version of StreamBuilder like in case of using https://github.com/jpzk/mockedstreams library for unit Testing.
For now The workaround is making a separate class that Extends StreamsBuilderS and then overriding inner there:
class StreamSTest(streamBuilder: StreamsBuilder) extends StreamsBuilderS {
override val inner = streamBuilder
}
@debasishg : This is valid Right ? If you allow I can also work on this .
@shiv4nsh This will certainly be useful. But we need to maintain compatibility with the existing API. It would be great if u work on this. maybe have another constructor in the companion object that takes a StreamsBuilder ?
@debasishg : Sure , I will make the changes and raise the PR . I will make the companion object and add the constructor that takes the StreamsBuilder and gives the instance of StreamBuilderS