public void DeleteAnuncio() { int id = 1; var data = new ResponseBase { Success = true, Message = null, Exception = null }; anuncioServiceMock.Setup(a => a.Delete(id)).Returns(data); var result = anunciosController.Delete(id); Assert.AreEqual(true, GetVal <bool>(result, "Success")); Assert.AreEqual(null, GetVal <string>(result, "Message")); }