I have been slaving away for the past three weeks trying to mock Examine, the library that Umbraco uses for indexing. It is based on Lucene and seems to be very easy to use. However in my quest to build an example application the TDD way, I needed to mock it. I wanted to build up the search queries up in a “Red Green Refactor” manner.
Once I finished flailing around with Intellisense and Google searches, I cracked open the source code for Examine, and was excited to see unit tests. After reading through the tests and code, I created some factory code to mock the index for use in the Gravyframe tests and I wanted to share them.
Subscribe to public abstract Gravy : Power
Get the latest posts delivered right to your inbox