Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2009-02-12 13:57:08 +0000
committermkuppe2009-02-12 13:57:08 +0000
commit302f469a58cd3be83dc51f2ff6b5242e32ddd955 (patch)
treee5b89d78912daba67e7dd4707a8cc87c6e535f81
parent85be7f16bb19831aed30412d77ecb9394b934d36 (diff)
downloadorg.eclipse.ecf-302f469a58cd3be83dc51f2ff6b5242e32ddd955.tar.gz
org.eclipse.ecf-302f469a58cd3be83dc51f2ff6b5242e32ddd955.tar.xz
org.eclipse.ecf-302f469a58cd3be83dc51f2ff6b5242e32ddd955.zip
NEW - bug 264126: BREE should include Foundation 1.1 as much as possible
https://bugs.eclipse.org/bugs/show_bug.cgi?id=264126
-rw-r--r--tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/util/StringUtilsTest.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/util/StringUtilsTest.java b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/util/StringUtilsTest.java
new file mode 100644
index 000000000..51761a13e
--- /dev/null
+++ b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/util/StringUtilsTest.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Markus Alexander Kuppe.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Markus Alexander Kuppe (ecf-dev_eclipse.org <at> lemmster.de <dot> de) - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ecf.tests.core.util;
+
+import org.eclipse.ecf.core.util.StringUtils;
+
+import junit.framework.TestCase;
+
+public class StringUtilsTest extends TestCase {
+
+ /**
+ * Test method for {@link org.eclipse.ecf.core.util.StringUtils#replaceFirst(java.lang.String, java.lang.String, java.lang.String)}.
+ */
+ public final void testReplaceFirstNoCase() {
+ String input = "barbar";
+ String toReplace = "bar";
+ String withReplace = "foo";
+ assertEquals("foobar", StringUtils.replaceFirst(input, toReplace, withReplace));
+ }
+
+ /**
+ * Test method for {@link org.eclipse.ecf.core.util.StringUtils#replaceFirst(java.lang.String, java.lang.String, java.lang.String)}.
+ */
+ public final void testReplaceFirstWithCase() {
+ String input = "Barbarbar";
+ String toReplace = "bar";
+ String withReplace = "foo";
+ assertEquals("Barfoobar", StringUtils.replaceFirst(input, toReplace, withReplace));
+ }
+}

Back to the top