On Friday, 16 March 2018 at 20:17:49 UTC, aberba wrote:
How will you test D code which makes calls to database to
detect bugs and regression. Unlike where you can inject data
like assert (2+1 == 3), database interfacing code will be
crazy... Or there's some mocking available for such cases.
On Mon, Mar 19, 2018 at 06:45:49PM +, aberba via Digitalmars-d-learn wrote:
[...]
> The thing about functional programming where functions are
> decoupled/testable doesn't seem to apply to database call code. I
> guess its because databases introduces a different state...another
> point of
On Monday, 19 March 2018 at 00:56:26 UTC, H. S. Teoh wrote:
On Sun, Mar 18, 2018 at 07:51:18PM +, aberba via
Digitalmars-d-learn wrote:
On Friday, 16 March 2018 at 21:15:33 UTC, H. S. Teoh wrote:
> On Fri, Mar 16, 2018 at 08:17:49PM +, aberba via
> Digitalmars-d-learn wrote:
> > [...]
On Sun, Mar 18, 2018 at 07:51:18PM +, aberba via Digitalmars-d-learn wrote:
> On Friday, 16 March 2018 at 21:15:33 UTC, H. S. Teoh wrote:
> > On Fri, Mar 16, 2018 at 08:17:49PM +, aberba via Digitalmars-d-learn
> > wrote:
> > > [...]
> >
> > The usual way I do this is to decouple the code
On Sunday, March 18, 2018 19:51:18 aberba via Digitalmars-d-learn wrote:
> On Friday, 16 March 2018 at 21:15:33 UTC, H. S. Teoh wrote:
> > On Fri, Mar 16, 2018 at 08:17:49PM +, aberba via
> >
> > Digitalmars-d-learn wrote:
> >> [...]
> >
> > The usual way I do this is to decouple the code from
On Friday, 16 March 2018 at 21:15:33 UTC, H. S. Teoh wrote:
On Fri, Mar 16, 2018 at 08:17:49PM +, aberba via
Digitalmars-d-learn wrote:
[...]
The usual way I do this is to decouple the code from the real
database backend by templatizing the database driver. Then in
my unittest I can
On Friday, 16 March 2018 at 20:17:49 UTC, aberba wrote:
How will you test D code which makes calls to database to
detect bugs and regression. Unlike where you can inject data
like assert (2+1 == 3), database interfacing code will be
crazy... Or there's some mocking available for such cases.
On Fri, Mar 16, 2018 at 08:17:49PM +, aberba via Digitalmars-d-learn wrote:
> How will you test D code which makes calls to database to detect bugs
> and regression. Unlike where you can inject data like assert (2+1 ==
> 3), database interfacing code will be crazy... Or there's some mocking
>
How will you test D code which makes calls to database to detect
bugs and regression. Unlike where you can inject data like assert
(2+1 == 3), database interfacing code will be crazy... Or there's
some mocking available for such cases. Especially when more
features are developed on top.