- Testes de unidade
- Testes de integração
- FIRST - (Fast, Independent, Repeatable, Self-verifying, Timely) link
- Desenho testável - pensar sobre design
- Retorno antecipado (early feedback)
- São como documentação
CREATE OR REPLACE FUNCTION months_between( | |
date, | |
date) | |
RETURNS integer AS | |
$BODY$ | |
DECLARE | |
dt_final date; | |
BEGIN | |
dt_final := $2; | |
#!/bin/bash | |
# Pega as versões da linha de comando | |
old=$1 | |
new=$2 | |
# Executa o comando que faz a substituição do conteúdo dos arquivos | |
## <version>2.0.0</version> | |
## version="2.0.0" | |
sed -e "s/<version>$old<\/version>/<version>$new<\/version>/" \ | |
-e "s/version=\"$old\"/version=\"$new\"/" \ |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.security.KeyStore; | |
import java.security.MessageDigest; | |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; |
# This one is to create a new runner with docker support | |
sudo sudo docker run -d --name runner --restart always \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /srv/gitlab-runner/config:/etc/gitlab-runner \ | |
gitlab/gitlab-runner:latest | |
# This one is to register a runner with services | |
sudo docker exec -it gitlab-runner gitlab-runner register \ | |
--url "https://gitlab.com/" \ | |
--registration-token "PROJECT_REGISTRATION_TOKEN" \ |
// O multimap | |
Multimap<CFOP, BigDecimal> valores; | |
for(CFOP cfop : valores.keySet()) { | |
List<BigDecimal> total = valores.get(cfop); | |
BigDecimal soma = Helper.sum(total); | |
// Obtemos o valor do cfop | |
} |
#Fri Jul 31 11:06:38 BRT 2015 | |
db.url=jdbc\:postgresql\://192.168.0.183/dev | |
db.output=false | |
db.usuario=postgres | |
db.senha=admin | |
login.usuario=f |
SELECT relname | |
FROM pg_catalog.pg_class | |
WHERE relpages = 0 | |
AND NOT relisshared | |
AND NOT relhassubclass | |
AND relkind = 'r' | |
AND relnamespace <> (SELECT oid FROM pg_namespace WHERE nspname = 'pg_catalog'); |
/* | |
* Para cadastrar um serviço, chame esse método no "start" da classe plugin | |
*/ | |
plugin.getBundle().getBundleContext().registerService(ExternalAPI.class, new ConcreteExternalAPI(), null); | |
/* | |
* Para obter o serviço registrado por outro plugin | |
*/ |