public void Deve_Cadastrar_Registro_POA() { fixture = ObtenhaCabecalho(inclusao: true); var postResult = TesteBase.ExecutePostAsync(fixture, obterUrlPost(), ObtenhaObjetoEnvio()); Assert.True(postResult.IsSuccessStatusCode, postResult.Content.ReadAsStringAsync().Result); }
public void Deve_Obter_Registro_Por_Id() { fixture = ObtenhaCabecalho(consulta: true); var postResult = TesteBase.ExecutePostAsync(fixture, obterUrlGet(1), ObtenhaObjetoEnvio()); Assert.True(postResult.IsSuccessStatusCode, postResult.Content.ReadAsStringAsync().Result); Assert.Equal(HttpStatusCode.OK, postResult.StatusCode); }
public void Deve_Salvar_Evento_Tipo() { _fixture = ObtenhaCabecalho(); EventoTipoDto Dto = ObtenhaObjetoCadastrar(); var postResult = TesteBase.ExecutePostAsync(_fixture, obterUrlPost(), Dto); Assert.True(postResult.IsSuccessStatusCode); }
public void Deve_Cadastar_Apagar_Tipo_Evento() { _fixture = ObtenhaCabecalho(); var postResult = TesteBase.ExecutePostAsync(_fixture, obterUrlPost(), ObtenhaObjetoCadastrar()); Assert.True(postResult.IsSuccessStatusCode); var deleteResult = TesteBase.ExecuteDeleteAsync(_fixture, obterUrlDelete(), new List <long> { 1 }); Assert.True(deleteResult.IsSuccessStatusCode); }
public async void Deve_Cadastrar_Consultar_Tipo_Evento() { _fixture = ObtenhaCabecalho(); var Dto = ObtenhaObjetoCadastrar(); var postResult = TesteBase.ExecutePostAsync(_fixture, obterUrlPost(), Dto); Assert.True(postResult.IsSuccessStatusCode); var getResult = TesteBase.ExecuteGetAsync(_fixture, obterUrlGet(1)); Assert.True(getResult.IsSuccessStatusCode); Assert.IsType <EventoTipoDto>(JsonConvert.DeserializeObject <EventoTipoDto>(await getResult.Content.ReadAsStringAsync())); }
public void Deve_Cadastar_Editar_Tipo_Evento() { _fixture = ObtenhaCabecalho(); var Dto = ObtenhaObjetoCadastrar(); var postResult = TesteBase.ExecutePostAsync(_fixture, obterUrlPost(), Dto); Assert.True(postResult.IsSuccessStatusCode); Dto.Id = 1; Dto.Descricao = "Teste Integracao"; var postResult2 = TesteBase.ExecutePostAsync(_fixture, obterUrlPost(), Dto); Assert.True(postResult2.IsSuccessStatusCode); }