public void HandledException() { CurrentUnitOfWork.ShouldNotBeNull(); CurrentUnitOfWork.Options.IsTransactional.ShouldBeTrue(); throw new UserFriendlyException("This is a sample exception!"); }
public void ExceptionOnComplete() { CurrentUnitOfWork.ShouldNotBeNull(); CurrentUnitOfWork.Options.IsTransactional.ShouldBeFalse(); _testUnitOfWorkConfig.ThrowExceptionOnComplete = true; }
public ActionResult ActionRequiresUowPost() { CurrentUnitOfWork.ShouldNotBeNull(); CurrentUnitOfWork.Options.IsTransactional.ShouldBeTrue(); return(Content("OK")); }
public IActionResult OnGetRequiresUow() { CurrentUnitOfWork.ShouldNotBeNull(); CurrentUnitOfWork.Options.IsTransactional.ShouldBeFalse(); return(Content("OK")); }
public ObjectResult OnGetExceptionOnComplete() { CurrentUnitOfWork.ShouldNotBeNull(); CurrentUnitOfWork.Options.IsTransactional.ShouldBeFalse(); _testUnitOfWorkConfig.ThrowExceptionOnComplete = true; //Prevent rendering of pages. return(new ObjectResult("")); }
public virtual void DoIt2 <T>() { CurrentUnitOfWork.ShouldNotBeNull(); }
public void DoIt <T>() { CurrentUnitOfWork.ShouldNotBeNull(); }