public void Should_Not_Throw_Exception_If_Complete_Called()
 {
     using (var uow = new InnerUnitOfWorkCompleteHandle())
     {
         uow.Complete();
     }
 }
Ejemplo n.º 2
0
 public void ShouldNotThrowExceptionIfCompleteCalled()
 {
     using (var uow = new InnerUnitOfWorkCompleteHandle())
     {
         uow.Complete();
     }
 }
 public void Should_Throw_Exception_If_Complete_Did_Not_Called()
 {
     Assert.Throws <AbpException>(() =>
     {
         using (var uow = new InnerUnitOfWorkCompleteHandle())
         {
         }
     }).Message.ShouldBe(InnerUnitOfWorkCompleteHandle.DidNotCallCompleteMethodExceptionMessage);
 }
Ejemplo n.º 4
0
 public void ShouldThrowExceptionIfCompleteDidNotCalled()
 {
     Assert.Throws <StudioXException>(() =>
     {
         using (var uow = new InnerUnitOfWorkCompleteHandle())
         {
         }
     }).Message.ShouldBe(InnerUnitOfWorkCompleteHandle.DidNotCallCompleteMethodExceptionMessage);
 }
Ejemplo n.º 5
0
 public void Should_Not_Override_Exception_If_Exception_Is_Thrown_By_User()
 {
     Assert.Throws <Exception>(
         new Action(() =>
     {
         using (var uow = new InnerUnitOfWorkCompleteHandle())
         {
             throw new Exception("My inner exception!");
         }
     })).Message.ShouldBe("My inner exception!");
 }
Ejemplo n.º 6
0
 public void ShouldNotOverrideExceptionIfExceptionIsThrownByUser()
 {
     Assert.Throws <Exception>(
         new Action(() =>
     {
         using (var uow = new InnerUnitOfWorkCompleteHandle())
         {
             throw new Exception("My inner exception!");
         }
     })).Message.ShouldBe("My inner exception!");
 }