CMajor.Tests.Infrastructure.UnitOfWorkAttributeTest.Test_Should_not_commit_if_there_is_Exception C# (CSharp) Method

Test_Should_not_commit_if_there_is_Exception() private method

private Test_Should_not_commit_if_there_is_Exception ( ) : void
return void
        public void Test_Should_not_commit_if_there_is_Exception()
        {
            var uowAttr = new UnitOfWorkAttribute();
            var mockUoW = new Mock<IUnitOfWork>();
            mockUoW.Setup(u => u.Commit()).Throws<InvalidOperationException>();

            uowAttr.UnitOfWork = mockUoW.Object;
            uowAttr.OnActionExecuted(new ActionExecutedContext() { Exception = new Exception() });
        }