Skip to content

Instantly share code, notes, and snippets.

View alexlehm's full-sized avatar

Alexander Lehmann alexlehm

View GitHub Profile
@alexlehm
alexlehm / LoginServiceTest.java
Created September 2, 2016 13:01
LoginServiceTest.java
import java.io.IOException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClientRequest;
import io.vertx.core.logging.Logger;
@alexlehm
alexlehm / DnsNameResolver.java
Created August 9, 2016 22:27
DnsNameResolver.java
/*
* Copyright 2015 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@alexlehm
alexlehm / UnknownHostExceptionTest.java
Created July 29, 2016 21:45
UnknownHostExceptionTest.java
import org.junit.Test;
import io.vertx.core.impl.VertxImpl;
import io.vertx.test.core.VertxTestBase;
/**
* @author <a href="http://oss.lehmann.cx/">Alexander Lehmann</a>
*
*/
public class UnknownHostExceptionTest extends VertxTestBase {
@alexlehm
alexlehm / NetClientTLSConnectTest.java
Created July 11, 2016 23:30
NetClientTLSConnectTest.java
package cx.lehmann.vertx;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.Vertx;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import io.vertx.core.net.NetClient;
import io.vertx.core.net.NetClientOptions;
import org.junit.Test;
import static org.junit.Assert.*;
import io.vertx.core.http.CaseInsensitiveHeaders;
/**
* @author <a href="http://oss.lehmann.cx/">Alexander Lehmann</a>
*
*/
@alexlehm
alexlehm / ProxyTest.java
Created May 5, 2016 20:19
ProxyTest.java
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClient;
import io.vertx.core.http.HttpClientOptions;
import io.vertx.core.http.HttpServer;
import io.vertx.core.http.HttpServerOptions;
@alexlehm
alexlehm / DefaultHostsFileEntriesResolverTest.java
Created April 28, 2016 19:09
DefaultHostsFileEntriesResolverTest.java
/**
* show issue https://github.com/netty/netty/issues/5182
* HostsFileParser tries to resolve hostnames as case-sensitive
*/
package cx.lehmann.vertx;
import org.junit.Test;
import static org.junit.Assert.assertNotNull;
@alexlehm
alexlehm / LocalhostTest.java
Created April 27, 2016 22:41
LocalhostTest.java
package cx.lehmann.vertx;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.Vertx;
import io.vertx.core.net.NetClient;
import io.vertx.ext.unit.Async;
import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.VertxUnitRunner;
@alexlehm
alexlehm / HttpsConnectTest.java
Created March 23, 2016 22:26
HttpsConnectTest.java
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.Vertx;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import io.vertx.core.net.NetClient;
import io.vertx.core.net.NetSocket;
import io.vertx.ext.unit.Async;
import io.vertx.ext.unit.TestContext;
@alexlehm
alexlehm / GetCertTLSTest.java
Created March 7, 2016 20:14
GetCertTLSTest.java
import javax.security.cert.X509Certificate;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.Vertx;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import io.vertx.core.net.NetClient;
import io.vertx.core.net.NetClientOptions;