From b9927c313a02e64f926b44caacddde6ceb6aba36 Mon Sep 17 00:00:00 2001 From: Maciej Mikosik Date: Tue, 14 Aug 2018 13:45:18 +0200 Subject: [PATCH] documented eclipse template --- main/doc/eclipse_templates.md | 13 +++++++++++++ main/doc/tutorial.md | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 main/doc/eclipse_templates.md diff --git a/main/doc/eclipse_templates.md b/main/doc/eclipse_templates.md new file mode 100644 index 0000000..b290293 --- /dev/null +++ b/main/doc/eclipse_templates.md @@ -0,0 +1,13 @@ +# Eclipse templates + +Creates new class annotated with `@RunWith(QuackeryRunner.class)`. Defines single method annotated with `@Quackery` returning empty suite. + +``` +@${rw:newType(org.junit.runner.RunWith)}(${qr:newType(org.quackery.junit.QuackeryRunner)}.class) +public class ${primary_type_name} { + @${q:newType(org.quackery.Quackery)} + public static ${test:newType(org.quackery.Test)} test() { + return ${staticImport:importStatic(org.quackery.Suite.suite)}suite(${primary_type_name}.class.getName())${cursor}; + } +} +``` \ No newline at end of file diff --git a/main/doc/tutorial.md b/main/doc/tutorial.md index 374d1f6..105a11a 100644 --- a/main/doc/tutorial.md +++ b/main/doc/tutorial.md @@ -1,7 +1,8 @@ [built-in contracts](#built-in-contracts) | [defining you own contracts](#defining-your-own-contracts) | [running](#running) | -[integration](#integration) +[integration](#integration) | +[extra](#extra) # built-in contracts [collection contract](#collection-contract) @@ -351,3 +352,7 @@ There are many problems that may occur during initialization. Method annotated w `@org.junit.Ignore` does not work on methods annotated with `@Quackery`. However ignoring whole class will ignore also quackery tests. Watch out for name collision between `org.quackery.Test` and `org.junit.Test`! + +# extra + + - [Eclipse templates](eclipse_templates.md)