Copied to clipboard

Flag this post as spam?

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


  • David Prothero 23 posts 106 karma points
    Sep 26, 2013 @ 19:54
    David Prothero
    0

    Examine searches don't return results in Unit Tests

    Has anyone gotten Examine to return search results in a Unit Test project (or command line tool)?

    var searcher = ExamineManager.Instance.SearchProviderCollection.Item("AgentSearcher");
    var searchResults = searcher.Search(filter(), true);

    The same code works great when I call it from a user control I've got running within the back office. When run from a unit test project, however, there are no search results.

    I'm using code similar to this example to get access to Umbraco API routines inside unit tests and command line tools.

    David

Please Sign in or register to post replies

Write your reply to:

Draft