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
def text = Hook.create().text() | |
println text.loremIpsum | |
println "* Words " | |
println text.words(1) | |
println text.words() | |
println text.words(190) | |
println "* Sentences" | |
println text.sentence() | |
println text.sentence(3) | |
println text.sentence(190) |
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
<pluginManagement> | |
... | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>2.5.1</version> | |
</plugin> | |
... | |
</pluginManagement> |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1.4.15 (GNU/Linux) | |
mQINBFKFPiYBEADBlrIGwiTARKzRt1AjcQgfyQvKYmBmFyTZWqXafm+TPWN59ZZO | |
Jon98Q0GWqOtKDUDW1nWdaARgxhCgaPSqcqreaegcFHmUe34+/bhEErx3tMkQBQk | |
n2OMUe7admnyoO8nLFf6NFisY/0hTjOXHkUcuqZ6McBSljAEkjdSZZ8W2ccP0WFb | |
oTPJf7AbAypD2AsmZO7kF+RcGZxbIYe0tROiM1WHjtdAjL33G8hssfPhMQp3M8BK | |
STXsPO57nBt6UB23f+Lo6adBFs6SdkmoSDKVGDA08CKTUDgxJX/C6bpbmYY0ZdCA | |
iVZbZr5PpZK7IlkGLTfqc2iKPjlkdJjoaT6UZiYZD7qNTEmjwcHsf8YD646vp/e+ | |
NVyZskMPqLZ+0hDJ1cUP3YsYpwozS7VGZ2FEF1ygHBfemEshkBWlXnKL5syzRU61 |
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
import com.googlecode.catchexception.MyException; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.mockito.InjectMocks; | |
import org.mockito.Mock; | |
import org.mockito.junit.MockitoJUnitRunner; | |
import static com.googlecode.catchexception.apis.BDDCatchException.caughtException; | |
import static com.googlecode.catchexception.apis.BDDCatchException.when; | |
import static org.assertj.core.api.BDDAssertions.then; |
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
import org.junit.Test; | |
import static com.googlecode.catchexception.CatchException.caughtException; | |
import static com.googlecode.catchexception.apis.CatchExceptionBdd.then; | |
import static com.googlecode.catchexception.apis.CatchExceptionBdd.when; | |
import static org.mockito.BDDMockito.given; | |
public class SomeServiceTest { | |
private SomeService myMock; |
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
import org.junit.Test; | |
import static com.googlecode.catchexception.CatchException.caughtException; | |
import static com.googlecode.catchexception.apis.CatchExceptionBdd.then; | |
import static com.googlecode.catchexception.apis.CatchExceptionBdd.when; | |
public class SomeServiceTest { | |
@Test | |
public void testDoThat() { |
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
import org.junit.Test; | |
import static com.googlecode.catchexception.CatchException.caughtException; | |
import static com.googlecode.catchexception.apis.CatchExceptionBdd.then; | |
import static com.googlecode.catchexception.apis.CatchExceptionBdd.when; | |
public class SomeTest { | |
SomeService foo; |
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
Solution without PowerMock | |
-- | |
import ch.qos.logback.classic.*; | |
import ch.qos.logback.classic.spi.LoggingEvent; | |
import ch.qos.logback.core.Appender; | |
import org.junit.*; | |
import org.junit.runner.RunWith; | |
import org.mockito.*; | |
import org.mockito.runners.MockitoJUnitRunner; |
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
fortune -s | cowsay -f (cowsay -l | tail -n +2 | tr ' ' '\n' | shuf -n 1) | |
_______________ | |
/ Universe, n.: \ | |
| | | |
\ The problem. / | |
--------------- | |
\ ^___^ | |
\ (ooo)\_______ |
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
import org.junit.Test; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import static com.googlecode.catchexception.CatchException.caughtException; | |
import static com.googlecode.catchexception.apis.CatchExceptionAssertJ.then; | |
import static com.googlecode.catchexception.apis.CatchExceptionAssertJ.when; |
OlderNewer