EPiWiki.se  - EPiServer notes shared with others
 

TDD

[Edit]
Test driven developing with EPiServer.

Set up EPiServer for test driven development
How to make test rum for both MsTest and NUnit

External Links


EPiAbstractions - Creates facades for most used EPiServer classes

Using anonymous functions for events



importer.ResolvePageId += (sender, e) => Assert.IsFalse(String.IsNullOrEmpty(e.Value));

Mock HttpResponse.Headers


Create a IHttpResponse

public NameValueCollection ResponseHeaders = new NameValueCollection();
...
_responseMock = new Mock<IHttpResponse>();
_requestMock.Setup(rm => rm.Headers).Returns(ResponseHeaders);
_responseMock.Setup(p => p.AddHeader(It.IsAny<string>(), It.IsAny<string>()))
   .Callback((string name, string val) => ResponseHeaders.Add(name, val));

Version author:
Mattias Lövström

EPiServer version

All