This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
RUN apt-get update && apt-get install -y python-software-properties software-properties-common | |
RUN apt-get install -y iputils-ping | |
RUN add-apt-repository ppa:webupd8team/java | |
RUN apt-get install -y vim | |
RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 boolean true" | debconf-set-selections | |
RUN apt-get update && apt-get install -y oracle-java8-installer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MagicMatcher <T> implements InvocationHandler { | |
//... | |
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { | |
if () { | |
//... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MagicMatcher <T> implements InvocationHandler { | |
//... | |
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { | |
if ("matches".equals(method.getName())) { | |
for (Entry<String, Object> entry : methodMap.entrySet()) { | |
String field = entry.getKey().substring(entry.getKey().indexOf("with") + 4); | |
Object objectValue = extractObjectValue((T) args[0], entry.getKey()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface PersonMatcher extends Matcher<Person> { | |
PersonMatcher withName(String expected); | |
PersonMatcher withName(Matcher<? super String> matching); | |
PersonMatcher withAge(int expected); | |
PersonMatcher withAge(Matcher<Integer> matching); | |
PersonMatcher withOptions(List<String> options); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PersonTest { | |
private Person person; | |
@Before | |
public void setUp() { | |
person = new Person(); | |
} | |
@Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.org.roger.model; | |
import java.util.List; | |
public class Person { | |
private String name; | |
private int age; | |
private List<String> options; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
SimpleWebServiceService wsClient = new SimpleWebServiceService(); | |
wsClient.setHandlerResolver(new MyHandlerResolver()); | |
final SimpleWebService simpleWebServicePort = wsClient.getSimpleWebServicePort(); | |
System.out.println(simpleWebServicePort.sayHello("Guest")); | |
} | |
public static class MyHandlerResolver implements HandlerResolver { | |
public List<Handler> getHandlerChain(PortInfo portInfo) { | |
List<Handler> handlers = new ArrayList<Handler>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<configuration scan="true" scanPeriod="3 seconds"> | |
<jmxConfigurator /> | |
<statusListener class= | |
"ch.qos.logback.core.status.OnConsoleStatusListener"/> | |
<appender name="STDOUT" | |
class="ch.qos.logback.core.ConsoleAppender"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>HTML5 Form Validation</title> | |
</head> | |
<body> | |
<form action='teste.asp'> | |
Telefone: | |
<input | |
type="text" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<dependency> | |
<groupId>org.bgee.log4jdbc-log4j2</groupId> | |
<artifactId>log4jdbc-log4j2-jdbc4</artifactId> | |
<version>1.16</version> | |
</dependency> | |
<dependency> | |
<groupId>ch.qos.logback</groupId> | |
<artifactId>logback-classic</artifactId> | |
<version>1.1.3</version> |