示例#1
0
 public void AoIniciarUmaTransacaoNaoDeveGerarErro()
 {
     using (var conexao = new ConexaoFake())
     {
         Action act = () => conexao.IniciarTransacao();
         act.ShouldNotThrow();
     }
 }
示例#2
0
 public void AoConfirmarUmaTransacaoNaoDeveGerarErro()
 {
     using (var conexao = new ConexaoFake())
         using (var transacao = conexao.IniciarTransacao() as TransacaoFake)
         {
             Action act = () => transacao.ConfirmarTransacao();
             act.ShouldNotThrow();
         }
 }
示例#3
0
 public void AoIniciarUmaTransacaoDuasVezesDeveGerarErroDeTransacaoJaIniciada()
 {
     using (var conexao = new ConexaoFake())
         using (var transacao = conexao.IniciarTransacao() as TransacaoFake)
         {
             Action act = () => conexao.IniciarTransacao();
             act.ShouldThrow <TransacaoJaIniciadaException>();
         }
 }
示例#4
0
 public void AoConfirmarUmaTransacaoSemTransacaoDeveGerarErroDeTransacaoNaoIniciada()
 {
     using (var conexao = new ConexaoFake())
         using (var transacao = conexao.IniciarTransacao() as TransacaoFake)
         {
             transacao.ConfirmarTransacao();
             Action act = () => transacao.ConfirmarTransacao();
             act.ShouldThrow <TransacaoNaoIniciadaException>();
         }
 }
示例#5
0
 public void AoIniciarUmaTransacaoAPropriedadeTransacaoAtualDeveEstarPreenchida()
 {
     using (var conexao = new ConexaoFake())
         using (var transacao = conexao.IniciarTransacao() as TransacaoFake)
         {
             transacao.TransacaoAtual
             .Should()
             .NotBeNull();
         }
 }