public void RetornaGanhadoresQuina() { ApostaNeg.NumerosSorteados = new List <int>(); ApostaNeg.NumerosSorteados.Add(1); ApostaNeg.NumerosSorteados.Add(2); ApostaNeg.NumerosSorteados.Add(3); ApostaNeg.NumerosSorteados.Add(4); ApostaNeg.NumerosSorteados.Add(5); ApostaNeg.NumerosSorteados.Add(6); RegistrarApostaClass apost = new RegistrarApostaClass() { CodigoTipoAposta = (char)ETipoAposta.MegaSena, Numeros = new int[] { 1, 2, 3, 4, 5, 60 } }; ApostaNeg.RegistrarNovaAposta(apost); IList <RegistrarApostaClass> resultado = ApostaNeg.RetornaGanhadoresQuina((char)ETipoAposta.MegaSena); if (resultado != null && resultado.Count > 0) { Assert.Pass(); } Assert.Fail(); }
public void RetornaApostas() { IList <RegistrarApostaClass> resultado = ApostaNeg.RetornaApostas((char)ETipoAposta.MegaSena); if (resultado != null) { Assert.Pass(); } Assert.Fail(); }
public void ObterNumerosSorteados() { IList <int> resultado = ApostaNeg.ObterNumerosSorteados((char)ETipoAposta.MegaSena); if (resultado != null && resultado.Count > 0) { Assert.Pass(); } Assert.Fail(); }
public void SortearResultadoAposta() { IList <int> resultado = ApostaNeg.SortearResultado((char)ETipoAposta.MegaSena); if (resultado != null) { Assert.Pass(); } Assert.Fail(); }
public IEnumerable <RegistrarApostaClass> RetornaApostas([FromBody] RegistrarApostaClass aposta) { try { return(ApostaNeg.RetornaApostas(aposta.CodigoTipoAposta)); } catch { return(new List <RegistrarApostaClass>()); } }
public IEnumerable <RegistrarApostaClass> CarregarGanhadoresQuadra([FromBody] RegistrarApostaClass aposta) { try { return(ApostaNeg.RetornaGanhadoresQuadra(aposta.CodigoTipoAposta)); } catch { return(new List <RegistrarApostaClass>()); } }
public void RegistrarNovaApostaTest() { RegistrarApostaClass apost = new RegistrarApostaClass() { CodigoTipoAposta = (char)ETipoAposta.MegaSena, Numeros = new int[] { 1, 2, 3, 4, 5, 6 } }; ApostaNeg.RegistrarNovaAposta(apost); Assert.Pass(); }
public NumResultadoClass ObterNumerosSorteados(char tipoAposta) { try { return(new NumResultadoClass() { Numeros = string.Join(" - ", ApostaNeg.ObterNumerosSorteados(tipoAposta)) }); } catch { return(new NumResultadoClass()); } }
public RegistrarApostaClass Surpresinha([FromBody] RegistrarApostaClass aposta) { try { return(ApostaNeg.Surpresinha(aposta.CodigoTipoAposta)); } catch (ApostaException ex) { return(new RegistrarApostaClass() { MensagemErro = ex.Mensagem }); } }
public RegistrarApostaClass RegistarAposta([FromBody] RegistrarApostaClass aposta) { try { return(ApostaNeg.RegistrarNovaAposta(aposta)); } catch (ApostaException ex) { return(new RegistrarApostaClass() { MensagemErro = ex.Mensagem }); } }
public void RegistrarNovaApostaErroNumero4() { RegistrarApostaClass apost = new RegistrarApostaClass() { CodigoTipoAposta = (char)ETipoAposta.MegaSena, Numeros = new int[] { 1, 2, 3, 4, 5, 90 } }; try { ApostaNeg.RegistrarNovaAposta(apost); } catch (ApostaException) { Assert.Pass(); } Assert.Fail(); }
public void RegistrarNovaApostaErroTipo() { RegistrarApostaClass apost = new RegistrarApostaClass() { CodigoTipoAposta = 'R', Numeros = new int[] { 1, 2, 3, 4, 5, 6 } }; try { ApostaNeg.RegistrarNovaAposta(apost); } catch (ApostaException) { Assert.Pass(); } Assert.Fail(); }
public void RegistrarNovaApostaSurpresinha() { ApostaNeg.Surpresinha((char)ETipoAposta.MegaSena); Assert.Pass(); }