diff options
author | mkuppe | 2009-02-12 13:57:08 +0000 |
---|---|---|
committer | mkuppe | 2009-02-12 13:57:08 +0000 |
commit | 302f469a58cd3be83dc51f2ff6b5242e32ddd955 (patch) | |
tree | e5b89d78912daba67e7dd4707a8cc87c6e535f81 /tests | |
parent | 85be7f16bb19831aed30412d77ecb9394b934d36 (diff) | |
download | org.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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/util/StringUtilsTest.java | 39 |
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)); + } +} |