From 0513b65541a1d06e625c9b36612f58183899f1ce Mon Sep 17 00:00:00 2001 From: Ole Hansen Date: Sun, 22 Jun 2014 16:49:15 +0200 Subject: [PATCH] Added JUnit asserts and fail snippets --- snippets/java.snippets | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/snippets/java.snippets b/snippets/java.snippets index ef29e80..ea2ec7a 100644 --- a/snippets/java.snippets +++ b/snippets/java.snippets @@ -135,6 +135,24 @@ snippet errln ## Exception Handling snippet as assert ${1:test} : "${2:Failure message}"; +snippet ae + assertEquals("${1:Failure message}", ${2:expected}, ${3:actual}); +snippet aae + assertArrayEquals("${1:Failure message}", ${2:expecteds}, ${3:actuals}); +snippet af + assertFalse("${1:Failure message}", ${2:condition}); +snippet at + assertTrue("${1:Failure message}", ${2:condition}); +snippet an + assertNull("${1:Failure message}", ${2:object}); +snippet ann + assertNotNull("${1:Failure message}", ${2:object}); +snippet ass + assertSame("${1:Failure message}", ${2:expected}, ${3:actual}); +snippet asns + assertNotSame("${1:Failure message}", ${2:expected}, ${3:actual}); +snippet fa + fail("${1:Failure message}"); snippet ca catch(${1:Exception} ${2:e}) ${0} snippet thr