[LRUG] Serialising a struct

Stephen Nelson-Smith sanelson at gmail.com
Mon Apr 14 09:25:03 PDT 2014


Hi Tom,


On Mon, Apr 14, 2014 at 4:48 PM, Tom Stuart <tom at codon.com> wrote:

> On 14 Apr 2014, at 15:07, Stephen Nelson-Smith <sanelson at gmail.com> wrote:
> > My responsibility (ie the stuff I want to test) is once I've got the
> data, which I get from the aws-sdk-core library in the form of structs.
>  Obviously I don't want to keep calling AWS when testing, so I'm using a
> test double.
>
> The suggestion may be too late to be practical, but this sounds like a
> potential opportunity to decouple the part of your application that queries
> AWS from the part that uses the resulting data, "hexagonal" style.
>

Yep... that's actually exactly what I've done.  There's a separate class
whose responsibility is purely to establish a connection via the AWS gem,
and broker data.  The thinking was that I can test and alter what is behind
that, as long as the adapter presents a unified interface to the rest of
the application.

S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20140414/317a41e2/attachment.html>


More information about the Chat mailing list