###OAuth
um modo de evitar a propagação de login/senha entre
muitas aplicações, tendo um único ponto onde se mantem o
class NoSufficientPapers < StandardError | |
end | |
class Atm | |
def initialize(notes) | |
@notes = notes | |
end | |
def available_papers |
public class LoadTests extends UnitTestCase { | |
@Override | |
@Before | |
public void setUp() { | |
super.setUp(); | |
} | |
@Test | |
public void shouldSaveALotOfPeople() { |
// Requer que um elemento em "list" possua alguma string "expected" | |
protected <T extends Element> void assertContains(List<T> list, String... expected) { | |
for (Element t : list) { | |
String name = t.getName(); | |
for (String str : expected) | |
if (str.equalsIgnoreCase(name)) return ; | |
} | |
Assert.fail("list there is no element called " + expected); | |
} |
//create | |
request = Restc.at("http://afternoon-fortress-4074.herokuapp.com/entries"); | |
response = request.mediaType(MediaType.FORM_ENCODED) | |
.data("entry[description] => created from java", | |
"entry[value] => 100.999") | |
.post(); | |
//update | |
require 'java' | |
require 'test/unit' | |
module JavaODIUnit | |
include_package "br.com.rpk.odiunit.implementation" | |
end | |
module ODIUnit | |
module Drivers |
# DSL purposes :D | |
class Fixnum | |
def item | |
self | |
end | |
def items | |
self | |
end | |
package br.com.todi.interceptors; | |
import br.com.caelum.vraptor.InterceptionException; | |
import br.com.caelum.vraptor.Intercepts; | |
import br.com.caelum.vraptor.Result; | |
import br.com.caelum.vraptor.core.InterceptorStack; | |
import br.com.caelum.vraptor.interceptor.Interceptor; | |
import br.com.caelum.vraptor.resource.ResourceMethod; | |
import br.com.todi.annotation.Restrito; | |
import br.com.todi.controller.LoginController; |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
<HTML> | |
<HEAD> | |
<TITLE> Jogo da Velha </TITLE> | |
<META NAME="Generator" CONTENT="EditPlus"> | |
<META NAME="Author" CONTENT=""> | |
<META NAME="Keywords" CONTENT=""> | |
<META NAME="Description" CONTENT=""> | |
<style> |
package criptografia; | |
import criptografia.exception.EncodeException; | |
/* | |
* Criado em 30/03/2011 por Robson Kraemer | |
*/ | |
public class Cifrador { | |