public void BuscaTarefasPorFiltroID() { #region Parameters //Resultado esperado string statusCodeEsperado = "OK"; #endregion TarefasGetRequest request = new TarefasGetRequest("1", true); IRestResponse <dynamic> response = request.ExecuteRequest(); Assert.Multiple(() => { Assert.AreEqual(statusCodeEsperado, response.StatusCode.ToString()); }); }
public void BuscaTarefaInexistente() { #region Parameters string idTarefa = "999999"; //Resultado esperado string statusCodeEsperado = "NotFound"; #endregion TarefasGetRequest request = new TarefasGetRequest(idTarefa); IRestResponse <dynamic> response = request.ExecuteRequest(); Assert.Multiple(() => { Assert.AreEqual(statusCodeEsperado, response.StatusCode.ToString()); Assert.AreEqual("Issue #" + idTarefa + " not found", response.Data["message"].ToString()); }); }
public void BuscaTodasAsTarefasDeProjeto() { #region Parameters string statusCodeEsperado = "OK"; //Resultado esperado #endregion TarefasGetRequest request = new TarefasGetRequest(1); IRestResponse <dynamic> response = request.ExecuteRequest(); Assert.Multiple(() => { Assert.AreEqual(statusCodeEsperado, response.StatusCode.ToString()); }); }
public void BuscaTarefasMonitoradasUsuarioToken() { #region Parameters string statusCodeEsperado = "OK"; //Resultado esperado #endregion TarefasGetRequest request = new TarefasGetRequest("monitored", true); IRestResponse <dynamic> response = request.ExecuteRequest(); Assert.Multiple(() => { Assert.AreEqual(statusCodeEsperado, response.StatusCode.ToString()); }); }
public void BuscaTarefaEspecifica() { #region Parameters string idTarefa = "1"; //Resultado esperado string statusCodeEsperado = "OK"; string summary = "Tarefa Teste"; string description = "Tarefa Teste"; #endregion TarefasGetRequest request = new TarefasGetRequest(idTarefa); IRestResponse <dynamic> response = request.ExecuteRequest(); Assert.Multiple(() => { Assert.AreEqual(statusCodeEsperado, response.StatusCode.ToString()); Assert.AreEqual(idTarefa, response.Data["issues"][0]["id"].ToString()); Assert.AreEqual(summary, response.Data["issues"][0]["summary"].ToString()); Assert.AreEqual(description, response.Data["issues"][0]["description"].ToString()); }); }