Unit Testing Sitecore using NUnit, serializing content

白昼怎懂夜的黑 提交于 2019-12-13 11:49:53

问题


In my business, I am working on Unit Testing, after finishing an example in a .NET application. We want to use a standard .NET Unit Testing project. We also want to mock the Sitecore data by serializing the Sitecore objects. I have been looking for, but could not find a good tutorial to do this. How can I do this?


回答1:


Interesting videos on Youtube

  1. Sitecore Unit Testing video by gravypower.
  2. Another interesting video by codeflood.
  3. Most knowledgeable for me was this video by Alistair Deneys from Hedgehog

Other interesting blogs are

  1. Igloo - Unit Testing for Sitecore
  2. iStern - Unit testing with Sitecore Item by Thomas Stern
  3. Mocking Sitecore with MS Fakes Part I and Part II by Thomas Stern
  4. And lastly my preferred Coffee => Coder => Code again by Alistair Deneys
  5. Knifecore's blog also helped me a lot when I was trying to write tests.

Let us know if this was helpful.

If you are interested in Serialization, Kern Nightingale has got a perfect presentation which will give you insight to how to use it for testing as well.

Finally would also recommend Sitecore Glimpse by Kevin Obee, the project's one of the purpose is "provide build scripts that automate the tasks of compiling, testing and packaging the project artifacts to make it easier to open the project up for collaborative development" which he mentions on his blog.



来源:https://stackoverflow.com/questions/19405896/unit-testing-sitecore-using-nunit-serializing-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!