Beispiel #1
0
        public void InsereNotaEmTarefaDDT(string textoNota, string nameState)
        {
            #region Parameters
            //Resultado esperado
            string statusCodeEsperado = "Created";
            #endregion

            NotasPostRequest request = new NotasPostRequest("1");
            request.setJsonBody(textoNota, nameState);
            IRestResponse <dynamic> response = request.ExecuteRequest();

            Assert.Multiple(() =>
            {
                Assert.AreEqual(statusCodeEsperado, response.StatusCode.ToString());
                Assert.AreEqual(textoNota, response.Data["note"]["text"].ToString());
                Assert.AreEqual(nameState, response.Data["note"]["view_state"]["name"].ToString());
            });
        }
Beispiel #2
0
        public void InsereNotaComTimeTrackingEmTarefa()
        {
            #region Parameters
            string textoNota = "Nota teste incluida na tarefa 1";
            string nameState = "public";
            string time      = "00:15";
            //Resultado esperado
            string statusCodeEsperado = "Created";
            #endregion

            NotasPostRequest request = new NotasPostRequest("1");
            request.setJsonBodyWithTimeTracking(textoNota, nameState, time);
            IRestResponse <dynamic> response = request.ExecuteRequest();

            Assert.Multiple(() =>
            {
                Assert.AreEqual(statusCodeEsperado, response.StatusCode.ToString());
                Assert.AreEqual(textoNota, response.Data["note"]["text"].ToString());
                Assert.AreEqual(nameState, response.Data["note"]["view_state"]["name"].ToString());
            });
        }