public void MvpHttpHandler_WithPresenterBindingAttribute_ProcessRequest_ShouldBindOnePresenter() { // Arrange var httpContext = new HttpContext(new HttpRequest("c:\test.txt", "http://test", "a=b"), new HttpResponse(null)); var handler = new TestHandler(); // Act handler.ProcessRequest(httpContext); // Assert Assert.AreEqual(1, handler.PresentersBound); }
public void MvpHttpHandler_ProcessRequest_ShouldRaiseLoadEventOnce() { // Arrange var httpContext = new HttpContext(new HttpRequest("c:\test.txt", "http://test", "a=b"), new HttpResponse(null)); var handler = new TestHandler(); var loadEventCallCount = 0; handler.Load += (s, e) => loadEventCallCount++; // Act handler.ProcessRequest(httpContext); // Assert Assert.AreEqual(1, loadEventCallCount); }