public void InsereProjetoDDT(string nome, string descricao) { #region Parameters //Resultado esperado string statusCodeEsperado = "Created"; #endregion ProjetosPostRequest request = new ProjetosPostRequest(); request.setJsonBody(nome, descricao); IRestResponse <dynamic> response = request.ExecuteRequest(); Assert.Multiple(() => { Assert.AreEqual(statusCodeEsperado, response.StatusCode.ToString()); Assert.AreEqual(nome, response.Data["project"]["name"].ToString()); Assert.AreEqual(descricao, response.Data["project"]["description"].ToString()); }); }
public void InsereProjeto() { #region Parameters string nome = "Projeto Teste"; string descricao = "Projeto incluido na automacao"; //Resultado esperado string statusCodeEsperado = "Created"; #endregion ProjetosPostRequest request = new ProjetosPostRequest(); request.setJsonBody(nome, descricao); IRestResponse <dynamic> response = request.ExecuteRequest(); Assert.Multiple(() => { Assert.AreEqual(statusCodeEsperado, response.StatusCode.ToString()); Assert.AreEqual(nome, response.Data["project"]["name"].ToString()); Assert.AreEqual(descricao, response.Data["project"]["description"].ToString()); StringAssert.IsMatch("(\\d+)", response.Data["project"]["id"].ToString()); }); }