Author: alexsmirnov
Date: 2009-07-29 02:04:23 -0400 (Wed, 29 Jul 2009)
New Revision: 15029
Added:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/LibraryBuilderTest.java
Log:
parametrized test
Added:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/LibraryBuilderTest.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/LibraryBuilderTest.java
(rev 0)
+++
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/LibraryBuilderTest.java 2009-07-29
06:04:23 UTC (rev 15029)
@@ -0,0 +1,69 @@
+/**
+ *
+ */
+package org.richfaces.cdk.apt;
+
+import static org.junit.Assert.*;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+import org.richfaces.cdk.xmlutils.XMLBodyMergeTest;
+import org.richfaces.cdk.xmlutils.XMLBodySerializerTest;
+import org.richfaces.cdk.xmlutils.XMLBodyTest;
+import org.richfaces.cdk.xmlutils.XPathComparatorTest;
+
+/**
+ * @author asmirnov
+ *
+ */
+(a)RunWith(Parameterized.class)
+public class LibraryBuilderTest {
+
+ private String param;
+
+
+ public LibraryBuilderTest(String param) {
+ this.param=param;
+ }
+
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ /**
+ * Test method for {@link org.richfaces.cdk.LibraryBuilder#createInstance()}.
+ */
+ @Test
+ public void createInstance() {
+ assertEquals("Parameter match","Two", param);
+ }
+
+
+ @Parameters
+ public static Collection<String[]> values(){
+ return Arrays.asList(new String[]{"One"},new String[]{"Two"},new
String[]{"Tree"});
+ }
+
+
+}
Property changes on:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/LibraryBuilderTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Show replies by date