Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Antony Briggs 78 posts 103 karma points
    Feb 14, 2013 @ 13:01
    Antony Briggs
    0

    Unit testing application code that uses the v6 API

    Hi Guys,

    Has anyone tried to decouple the new Umbraco v6 services in order to unit test retrieving or updating content in their own application code?

    I can see that the new services (ContentService et al.) are nicely decoupled taking the database provider & publishing strategy as constructor arguments but the ServiceContext & ApplicationContext still seem pretty closed.

    Anyone had any success?

    Ant

  • Andreas Iseli 150 posts 427 karma points
    Feb 18, 2013 @ 16:02
    Andreas Iseli
    0

    Well only when using an advanced mocking framework like JustMock. I started a feature request to be able to populate an own UmbracoContext based on a faked HttpContext but no response yet. Perhaps you may want to extend my feature request for your purposes:

    http://issues.umbraco.org/issue/U4-1717

Please Sign in or register to post replies

Write your reply to:

Draft