Esempio n. 1
0
 public void AoIniciarUmaTransacaoNaoDeveGerarErro()
 {
     using (var conexao = new ConexaoFake())
     {
         Action act = () => conexao.IniciarTransacao();
         act.ShouldNotThrow();
     }
 }
Esempio n. 2
0
 public void AoConfirmarUmaTransacaoNaoDeveGerarErro()
 {
     using (var conexao = new ConexaoFake())
         using (var transacao = conexao.IniciarTransacao() as TransacaoFake)
         {
             Action act = () => transacao.ConfirmarTransacao();
             act.ShouldNotThrow();
         }
 }
Esempio n. 3
0
 public void AoIniciarUmaTransacaoDuasVezesDeveGerarErroDeTransacaoJaIniciada()
 {
     using (var conexao = new ConexaoFake())
         using (var transacao = conexao.IniciarTransacao() as TransacaoFake)
         {
             Action act = () => conexao.IniciarTransacao();
             act.ShouldThrow <TransacaoJaIniciadaException>();
         }
 }
Esempio n. 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>();
         }
 }
Esempio n. 5
0
 public void AoIniciarUmaTransacaoAPropriedadeTransacaoAtualDeveEstarPreenchida()
 {
     using (var conexao = new ConexaoFake())
         using (var transacao = conexao.IniciarTransacao() as TransacaoFake)
         {
             transacao.TransacaoAtual
             .Should()
             .NotBeNull();
         }
 }