aboutsummaryrefslogtreecommitdiff
path: root/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates
diff options
context:
space:
mode:
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmActivityToLayoutMethodTest.java50
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmCamelCaseToUnderscoreMethodTest.java58
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmClassNameToResourceMethodTest.java66
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlAttributeMethodTest.java50
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethodTest.java66
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlTextMethodTest.java46
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmExtractLettersMethodTest.java46
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmLayoutToActivityMethodTest.java54
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmSlashedPackageNameMethodTest.java50
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmUnderscoreToCamelCaseMethodTest.java58
10 files changed, 0 insertions, 544 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmActivityToLayoutMethodTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmActivityToLayoutMethodTest.java
deleted file mode 100644
index 9caeab25e..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmActivityToLayoutMethodTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
- *
- * 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 com.android.ide.eclipse.adt.internal.wizards.templates;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModelException;
-
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-@SuppressWarnings("javadoc")
-public class FmActivityToLayoutMethodTest extends TestCase {
- @SuppressWarnings("rawtypes")
- private void check(String s, String expected) throws TemplateModelException {
- FmActivityToLayoutMethod method = new FmActivityToLayoutMethod();
- List list = Collections.singletonList(new SimpleScalar(s));
- assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
- }
-
- public void test1() throws Exception {
- check("FooActivity", "activity_foo");
- }
-
- public void test2() throws Exception {
- check("FooActiv", "activity_foo");
- }
-
- public void test3() throws Exception {
- check("Foo", "activity_foo");
- }
-
- public void test4() throws Exception {
- check("", "");
- }
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmCamelCaseToUnderscoreMethodTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmCamelCaseToUnderscoreMethodTest.java
deleted file mode 100644
index dee0ce6bf..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmCamelCaseToUnderscoreMethodTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
- *
- * 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 com.android.ide.eclipse.adt.internal.wizards.templates;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModelException;
-
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-@SuppressWarnings("javadoc")
-public class FmCamelCaseToUnderscoreMethodTest extends TestCase {
- @SuppressWarnings("rawtypes")
- private void check(String s, String expected) throws TemplateModelException {
- FmCamelCaseToUnderscoreMethod method = new FmCamelCaseToUnderscoreMethod();
- List list = Collections.singletonList(new SimpleScalar(s));
- assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
- }
-
- public void test1() throws Exception {
- check("", "");
- }
-
- public void test2() throws Exception {
- check("foo", "foo");
- }
-
- public void test3() throws Exception {
- check("Foo", "foo");
- }
-
- public void test4() throws Exception {
- check("FooBar", "foo_bar");
- }
-
- public void test5() throws Exception {
- check("testXML", "test_xml");
- }
-
- public void test6() throws Exception {
- check("testFoo", "test_foo");
- }
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmClassNameToResourceMethodTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmClassNameToResourceMethodTest.java
deleted file mode 100644
index ff90ea0ed..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmClassNameToResourceMethodTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
- *
- * 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 com.android.ide.eclipse.adt.internal.wizards.templates;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModelException;
-
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-@SuppressWarnings("javadoc")
-public class FmClassNameToResourceMethodTest extends TestCase {
- @SuppressWarnings("rawtypes")
- private void check(String s, String expected) throws TemplateModelException {
- FmClassNameToResourceMethod method = new FmClassNameToResourceMethod();
- List list = Collections.singletonList(new SimpleScalar(s));
- assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
- }
-
- public void test1() throws Exception {
- check("FooActivity", "foo");
- }
-
- public void test2() throws Exception {
- check("FooActiv", "foo");
- }
-
- public void test3() throws Exception {
- check("Foo", "foo");
- }
-
- public void test4() throws Exception {
- check("", "");
- }
-
- public void test5() throws Exception {
- check("FooFragment", "foo");
- }
-
- public void test6() throws Exception {
- check("FooService", "foo");
- }
-
- public void test7() throws Exception {
- check("FooProvider", "foo");
- }
-
- public void test8() throws Exception {
- check("FooBar", "foo_bar");
- }
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlAttributeMethodTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlAttributeMethodTest.java
deleted file mode 100644
index eb1e94940..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlAttributeMethodTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
- *
- * 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 com.android.ide.eclipse.adt.internal.wizards.templates;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModelException;
-
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-@SuppressWarnings("javadoc")
-public class FmEscapeXmlAttributeMethodTest extends TestCase {
- @SuppressWarnings("rawtypes")
- private void check(String s, String expected) throws TemplateModelException {
- FmEscapeXmlAttributeMethod method = new FmEscapeXmlAttributeMethod();
- List list = Collections.singletonList(new SimpleScalar(s));
- assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
- }
-
- public void test1() throws Exception {
- check("", "");
- }
-
- public void test2() throws Exception {
- check("foo", "foo");
- }
-
- public void test3() throws Exception {
- check("<\"'>&", "&lt;&quot;&apos;>&amp;");
- }
-
- public void test4() throws Exception {
- check("foo>bar", "foo>bar");
- }
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethodTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethodTest.java
deleted file mode 100644
index 1a4289a03..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlStringMethodTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
- *
- * 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 com.android.ide.eclipse.adt.internal.wizards.templates;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModelException;
-
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-@SuppressWarnings("javadoc")
-public class FmEscapeXmlStringMethodTest extends TestCase {
- @SuppressWarnings("rawtypes")
- private void check(String s, String expected) throws TemplateModelException {
- FmEscapeXmlStringMethod method = new FmEscapeXmlStringMethod();
- List list = Collections.singletonList(new SimpleScalar(s));
- assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
- }
-
- public void test1() throws Exception {
- check("", "");
- }
-
- public void test2() throws Exception {
- check("foo", "foo");
- }
-
- public void test3() throws Exception {
- check(" Foo Bar ", "\" Foo Bar \"");
- }
-
- public void test4() throws Exception {
- check("@foo", "\\@foo");
- }
-
- public void test5() throws Exception {
- check("Hello\nWorld", "Hello\\nWorld");
- }
-
- public void test6() throws Exception {
- check("A & B", "A &amp; B");
- }
-
- public void test7() throws Exception {
- check("Foo's Bar", "Foo\\'s Bar");
- }
-
- public void test8() throws Exception {
- check("'\"\\", "\\'\\\"\\\\");
- }
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlTextMethodTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlTextMethodTest.java
deleted file mode 100644
index c08b834e9..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmEscapeXmlTextMethodTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
- *
- * 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 com.android.ide.eclipse.adt.internal.wizards.templates;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModelException;
-
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-@SuppressWarnings("javadoc")
-public class FmEscapeXmlTextMethodTest extends TestCase {
- @SuppressWarnings("rawtypes")
- private void check(String s, String expected) throws TemplateModelException {
- FmEscapeXmlTextMethod method = new FmEscapeXmlTextMethod();
- List list = Collections.singletonList(new SimpleScalar(s));
- assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
- }
-
- public void test1() throws Exception {
- check("", "");
- }
-
- public void test2() throws Exception {
- check("foo", "foo");
- }
-
- public void test3() throws Exception {
- check("<\"'>&", "&lt;\"'>&amp;");
- }
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmExtractLettersMethodTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmExtractLettersMethodTest.java
deleted file mode 100644
index b1d3cee13..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmExtractLettersMethodTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
- *
- * 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 com.android.ide.eclipse.adt.internal.wizards.templates;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModelException;
-
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-@SuppressWarnings("javadoc")
-public class FmExtractLettersMethodTest extends TestCase {
- @SuppressWarnings("rawtypes")
- private void check(String s, String expected) throws TemplateModelException {
- FmExtractLettersMethod method = new FmExtractLettersMethod();
- List list = Collections.singletonList(new SimpleScalar(s));
- assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
- }
-
- public void test1() throws Exception {
- check("", "");
- }
-
- public void test2() throws Exception {
- check("foo", "foo");
- }
-
- public void test3() throws Exception {
- check("<\"'>&foo ", "foo");
- }
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmLayoutToActivityMethodTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmLayoutToActivityMethodTest.java
deleted file mode 100644
index af0a1dbf5..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmLayoutToActivityMethodTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
- *
- * 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 com.android.ide.eclipse.adt.internal.wizards.templates;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModelException;
-
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-@SuppressWarnings("javadoc")
-public class FmLayoutToActivityMethodTest extends TestCase {
- @SuppressWarnings("rawtypes")
- private void check(String s, String expected) throws TemplateModelException {
- FmLayoutToActivityMethod method = new FmLayoutToActivityMethod();
- List list = Collections.singletonList(new SimpleScalar(s));
- assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
- }
-
- public void test1() throws Exception {
- check("foo", "FooActivity");
- }
-
- public void test2() throws Exception {
- check("activity_foo", "FooActivity");
- }
-
- public void test3() throws Exception {
- check("activity_", "MyActivity");
- }
-
- public void test4() throws Exception {
- check("activ", "ActivActivity");
- }
-
- public void test5() throws Exception {
- check("", "MyActivity");
- }
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmSlashedPackageNameMethodTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmSlashedPackageNameMethodTest.java
deleted file mode 100644
index 439110237..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmSlashedPackageNameMethodTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
- *
- * 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 com.android.ide.eclipse.adt.internal.wizards.templates;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModelException;
-
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-@SuppressWarnings("javadoc")
-public class FmSlashedPackageNameMethodTest extends TestCase {
- @SuppressWarnings("rawtypes")
- private void check(String s, String expected) throws TemplateModelException {
- FmSlashedPackageNameMethod method = new FmSlashedPackageNameMethod();
- List list = Collections.singletonList(new SimpleScalar(s));
- assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
- }
-
- public void test1() throws Exception {
- check("", "");
- }
-
- public void test2() throws Exception {
- check("foo", "foo");
- }
-
- public void test3() throws Exception {
- check("foo.bar.baz", "foo/bar/baz");
- }
-
- public void test4() throws Exception {
- check("foo/bar/baz", "foo/bar/baz");
- }
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmUnderscoreToCamelCaseMethodTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmUnderscoreToCamelCaseMethodTest.java
deleted file mode 100644
index 4955dae79..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/wizards/templates/FmUnderscoreToCamelCaseMethodTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php
- *
- * 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 com.android.ide.eclipse.adt.internal.wizards.templates;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModelException;
-
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-@SuppressWarnings("javadoc")
-public class FmUnderscoreToCamelCaseMethodTest extends TestCase {
- @SuppressWarnings("rawtypes")
- private void check(String s, String expected) throws TemplateModelException {
- FmUnderscoreToCamelCaseMethod method = new FmUnderscoreToCamelCaseMethod();
- List list = Collections.singletonList(new SimpleScalar(s));
- assertEquals(expected, ((SimpleScalar) method.exec(list)).getAsString());
- }
-
- public void test1() throws Exception {
- check("", "");
- }
-
- public void test2() throws Exception {
- check("_", "");
- }
-
- public void test3() throws Exception {
- check("foo", "Foo");
- }
-
- public void test4() throws Exception {
- check("foo_bar", "FooBar");
- }
-
- public void test5() throws Exception {
- check("foo__bar", "FooBar");
- }
-
- public void test6() throws Exception {
- check("foo_", "Foo");
- }
-}