Skip to content

Commit

Permalink
2.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
MammatusPlatypus committed Apr 15, 2016
1 parent ca2b6db commit 9dfe2bf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'io.advantageous.reakt'
version '2.1.0-SNAPSHOT'
version '2.1.0.RELEASE'

apply plugin: 'java'
apply plugin: 'maven'
Expand Down Expand Up @@ -29,7 +29,7 @@ repositories {
dependencies {

testCompile group: 'junit', name: 'junit', version: '4.11'
compile group: project.group, name: 'reakt', version: "2.1.0-SNAPSHOT"
compile group: project.group, name: 'reakt', version: "2.1.0.RELEASE"
compile group: 'io.vertx', name: 'vertx-core', version: vertxVersion

}
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/io/advantageous/reakt/vertx/ReaktVertx.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ public class ReaktVertx {

/**
* Works with both Reakt promises and Reakt callbacks
*
* @param promise promise
* @param <T> type of result
* @param <T> type of result
* @return vertx handler
*/
public static <T> Handler<AsyncResult<T>> convertPromise(final Promise<T> promise) {
Expand All @@ -20,8 +21,9 @@ public static <T> Handler<AsyncResult<T>> convertPromise(final Promise<T> promis

/**
* Works with both Reakt promises and Reakt callbacks
*
* @param callback callback
* @param <T> type of result
* @param <T> type of result
* @return vertx handler
*/
public static <T> Handler<AsyncResult<T>> convertCallback(final Callback<T> callback) {
Expand Down
21 changes: 9 additions & 12 deletions src/test/java/io/advantageous/reakt/vertx/ReaktVertxTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,10 @@

import java.util.concurrent.atomic.AtomicReference;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.*;

public class ReaktVertxTest {

public static class Employee {
private final String id;

public Employee(String id) {
this.id = id;
}
}

@Test
public void testConvertPromiseSuccess() throws Exception {

Expand Down Expand Up @@ -66,7 +56,6 @@ public boolean failed() {
assertEquals("Bob", ref.get().get().id);
}


@Test
public void testConvertPromiseFailure() throws Exception {

Expand Down Expand Up @@ -108,4 +97,12 @@ public boolean failed() {
assertEquals("bad stuff", promise.cause().getMessage());
assertEquals("bad stuff", ref.get().getMessage());
}

public static class Employee {
private final String id;

public Employee(String id) {
this.id = id;
}
}
}

0 comments on commit 9dfe2bf

Please sign in to comment.