This file contains hidden or 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
class Publisher { | |
private Subscriber subscriber | |
Publisher(Subscriber subscriber) { | |
this.subscriber = subscriber | |
} | |
String sendAndGetStatus(String message) { | |
return subscriber.receive(message) | |
} |
This file contains hidden or 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
subscriber.receive(_) >> "ok" | |
| | | | | |
| | | gerador de resposta | |
| | argumento de restrição | |
| método de restrição | |
objeto de restrição |
This file contains hidden or 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
given: | |
def stack = new Stack() | |
when: | |
stack.pop() | |
then: | |
thrown(EmptyStackException) | |
stack.empty |
This file contains hidden or 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
subscriber.receive(_) >> { throw new InternalError("ouch") } |
This file contains hidden or 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
java.base | |
java.compiler | |
java.datatransfer | |
java.desktop | |
java.instrument | |
java.logging | |
java.management | |
java.management.rmi | |
java.naming | |
java.net.http |
This file contains hidden or 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
java.base | |
java.compiler | |
java.datatransfer | |
java.instrument | |
java.logging | |
java.management | |
java.management.rmi | |
java.naming | |
java.net.http | |
java.prefs |
This file contains hidden or 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
import com.soywiz.korge.* | |
import com.soywiz.korge.html.* | |
import com.soywiz.korge.view.* | |
import com.soywiz.korim.color.* | |
import com.soywiz.korim.font.* | |
import com.soywiz.korim.format.* | |
import com.soywiz.korio.file.std.* | |
import com.soywiz.korma.geom.* | |
import com.soywiz.korma.geom.vector.* |
OlderNewer