示例#1
0
        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());
            });
        }
示例#2
0
        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());
            });
        }
示例#3
0
        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());
            });
        }
示例#4
0
        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());
            });
        }
示例#5
0
        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());
            });
        }