public void Can_Return_OpenIdPartialView_WhenAjax()
 {
     requestObject.SetupGet(x => x.Headers).Returns(
             new System.Net.WebHeaderCollection {
                 {"X-Requested-With", "XMLHttpRequest"}
             });
     var ac = new AccountController(formService.Object, memberService.Object, userRepo.Object, openIdService.Object);
     ac.ControllerContext = new ControllerContext(mockhttpContext.Object, new RouteData(), ac);
     // it returns the default view
     var result = ac.OpenIdPopup()
                    .ReturnsPartialViewResult()
                    .ForView("_OpenIdHtml");
 }
 public void Can_Return_OpenIdPopupView_When_NotAjax()
 {
     var ac = new AccountController(formService.Object, memberService.Object, userRepo.Object, openIdService.Object);
     ac.ControllerContext = new ControllerContext(mockhttpContext.Object, new RouteData(), ac);
     // it returns the default view
     var result = ac.OpenIdPopup()
                    .ReturnsViewResult()
                    .ForView("");
 }