Embedded Solr server for unit testing in C#

405 views
Skip to first unread message

Alex C

unread,
Aug 22, 2012, 6:47:38 AM8/22/12
to sol...@googlegroups.com
Hi. How do you do unit testing of Solr (with SolrNet) without having to use localhost and keeping everything inside your unit test? There is an embedded Solr for Java but is there such a thing for C#? Any examples? Thanks.

Mauricio Scheffer

unread,
Aug 22, 2012, 9:32:14 AM8/22/12
to sol...@googlegroups.com
About embedded Solr in .NET, see  http://code.google.com/p/solrnet/issues/detail?id=69 
Note that using this would make it an integration test, not a unit test.
For unit testing, you can either mock out ISolrOperations, or (for a call to ISolrOperations.Query) simply test your generation of the query and queryoptions, and your processing of the results.

Cheers
Mauricio


On Wed, Aug 22, 2012 at 7:47 AM, Alex C <coug...@gmail.com> wrote:
Hi. How do you do unit testing of Solr (with SolrNet) without having to use localhost and keeping everything inside your unit test? There is an embedded Solr for Java but is there such a thing for C#? Any examples? Thanks.

--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To view this discussion on the web visit https://groups.google.com/d/msg/solrnet/-/nzGr83-Rj8YJ.
To post to this group, send email to sol...@googlegroups.com.
To unsubscribe from this group, send email to solrnet+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/solrnet?hl=en.

Reply all
Reply to author
Forward
0 new messages