From dfaa568d1c397ba68dab3a613107da8e1368d40d Mon Sep 17 00:00:00 2001 From: Rifat Nabi Date: Tue, 19 Jun 2012 04:54:21 +0600 Subject: [PATCH] added some core tests Signed-off-by: Rifat Nabi --- src/test/java/com/omicronlab/avro/AvroTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/test/java/com/omicronlab/avro/AvroTest.java b/src/test/java/com/omicronlab/avro/AvroTest.java index c39f9d3..7c38adf 100644 --- a/src/test/java/com/omicronlab/avro/AvroTest.java +++ b/src/test/java/com/omicronlab/avro/AvroTest.java @@ -51,6 +51,23 @@ public void beforeTest() { } } + // Core Tests + @Test + public void checkSingleton() { + assertEquals(PhoneticParser.getInstance(), PhoneticParser.getInstance()); + } + + @Test(expected = CloneNotSupportedException.class) + public void tryToClone() throws Exception { + avro.clone(); + } + + @Test(expected = Exception.class) + public void setLoaderToNull() throws Exception { + avro.setLoader(null); + avro.init(); + } + // XML Configuration Tests @Test public void xmlTestSentances() {