You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2008/05/02 20:46:13 UTC
svn commit: r652871 - in /activemq/camel/trunk/components/camel-hamcrest:
pom.xml src/test/java/org/apache/camel/hamcrest/AssertionsTest.java
Author: jstrachan
Date: Fri May 2 11:46:13 2008
New Revision: 652871
URL: http://svn.apache.org/viewvc?rev=652871&view=rev
Log:
added a test case to avoid the build breaking :)
Added:
activemq/camel/trunk/components/camel-hamcrest/src/test/java/org/apache/camel/hamcrest/AssertionsTest.java (with props)
Modified:
activemq/camel/trunk/components/camel-hamcrest/pom.xml
Modified: activemq/camel/trunk/components/camel-hamcrest/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-hamcrest/pom.xml?rev=652871&r1=652870&r2=652871&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-hamcrest/pom.xml (original)
+++ activemq/camel/trunk/components/camel-hamcrest/pom.xml Fri May 2 11:46:13 2008
@@ -30,7 +30,7 @@
<artifactId>camel-hamcrest</artifactId>
<packaging>bundle</packaging>
- <name>Camel :: JUnit</name>
+ <name>Camel :: Hamcrest</name>
<description>Camel Hamcrest support</description>
<properties>
@@ -49,6 +49,11 @@
<!-- testing -->
<dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<scope>test</scope>
Added: activemq/camel/trunk/components/camel-hamcrest/src/test/java/org/apache/camel/hamcrest/AssertionsTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-hamcrest/src/test/java/org/apache/camel/hamcrest/AssertionsTest.java?rev=652871&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-hamcrest/src/test/java/org/apache/camel/hamcrest/AssertionsTest.java (added)
+++ activemq/camel/trunk/components/camel-hamcrest/src/test/java/org/apache/camel/hamcrest/AssertionsTest.java Fri May 2 11:46:13 2008
@@ -0,0 +1,44 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.hamcrest;
+
+import junit.framework.TestCase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+public class AssertionsTest extends TestCase {
+ private static final transient Log LOG = LogFactory.getLog(AssertionsTest.class);
+
+ public void testInstanceOf() throws Exception {
+ String value = Assertions.assertInstanceOf("abc", String.class);
+ assertEquals("value", "abc", value);
+ }
+
+ public void testInstanceOfFails() throws Exception {
+ try {
+ String value = Assertions.assertInstanceOf(123, String.class);
+ fail("Should not return a value: " + value);
+ }
+ catch (AssertionError e) {
+ LOG.info("Caught expected exception: " + e, e);
+ }
+ }
+}
Propchange: activemq/camel/trunk/components/camel-hamcrest/src/test/java/org/apache/camel/hamcrest/AssertionsTest.java
------------------------------------------------------------------------------
svn:eol-style = native