public void ForceCaptureHigNotNeeded()
        {
            //ARRANGE
            

            var controller = GetAuthenticatedControllerMock<HomeController>(Orguser);
            var context = GetContext(true);
            controller.ControllerContext = new ControllerContext(context, new RouteData(), controller);

            controller.OrgUser.LatestHig = new HIGEntry
            {
                CaptureDate = DateTime.Now,
                Subject = Orguser.ToSimpleUser(),
                Value = 0,
            };

            var ctxStub = MockRepository.GenerateMock<ActionExecutingContext>();
            ctxStub.Stub(ctx => ctx.ActionDescriptor.GetCustomAttributes(typeof(ForceDailyHIGAttribute), false)).Return(new object[] { new ForceDailyHIGAttribute() });
            ctxStub.Stub(ctx => ctx.Controller).Return(controller);

            var attribute = new ForceDailyHIGAttribute();
             

            //ACT
            //access the homepage?
            attribute.OnActionExecuting(ctxStub);

            //ASSERT

            Assert.IsNull(ctxStub.Result);

        }
        public void ForceCaptureHig()
        {
            //ARRANGE
            

            var controller = GetAuthenticatedControllerMock<HomeController>(Orguser);
            var context = GetContext(true);
            context.Request.Stub(r => r.Url).Return(new Uri("http://localhost/")); 

            controller.ControllerContext = new ControllerContext(context, new RouteData(), controller);

            controller.OrgUser.LatestHig = new HIGEntry
            {
                CaptureDate = DateTime.Now.AddDays(-1),
                Subject = Orguser.ToSimpleUser(),
                Value = 0,
            };

            var ctxStub = MockRepository.GeneratePartialMock<ActionExecutingContext>();
            var request = MockRepository.GeneratePartialMock <HttpRequestBase>();
            var httpcontext = MockRepository.GeneratePartialMock<HttpContextBase>(); 
            request.Stub(r => r.Url).Return(new Uri("http://localhost/"));
            httpcontext.Stub(r => r.Request).Return(request);
            

            ctxStub.Stub(ctx => ctx.ActionDescriptor.GetCustomAttributes(typeof(ForceDailyHIGAttribute), false)).Return(new object[]{new ForceDailyHIGAttribute()});
            ctxStub.Stub(ctx => ctx.Controller).Return(controller);
            ctxStub.Stub(r => r.HttpContext).Return(httpcontext);
            
            //ctxStub.Stub(ctx => ctx.RequestContext).Return(requestcontext); 



            var attribute = new ForceDailyHIGAttribute(); 

            //ACT
            //access the homepage?
            attribute.OnActionExecuting(ctxStub);

            //ASSERT
            Assert.IsInstanceOfType(ctxStub.Result, typeof(RedirectResult));
            var redirect = (RedirectResult)ctxStub.Result;

            Assert.AreEqual("/HIG/HowsItGoing", redirect.Url, true);

        }