public void Execute_ValidationSucceeds_StatementsExecuted()
        {
            // execute
            _deleteProjectCommand.Execute(1);

            // assert
            _dbContext.Received(4).ExecuteNonQuery(Arg.Any <string>(), Arg.Any <object>());
        }
Exemplo n.º 2
0
        public dynamic DeleteProject(dynamic pId)
        {
            // make sure the id is a valid integer
            int projectId = 0;

            if (!Int32.TryParse((pId ?? "").ToString(), out projectId))
            {
                return(HttpStatusCode.BadRequest);
            }

            _deleteProjectCommand.Execute(projectId);
            return(this.Response.AsJson(""));
        }