[seam-commits] Seam SVN: r12783 - modules/international/trunk/api/src/test/java/org/jboss/seam/international/status/builder.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon May 24 12:00:45 EDT 2010
Author: lincolnthree
Date: 2010-05-24 12:00:44 -0400 (Mon, 24 May 2010)
New Revision: 12783
Modified:
modules/international/trunk/api/src/test/java/org/jboss/seam/international/status/builder/TemplateMessageTest.java
Log:
Too many tests failing, un-commenting since this doesn't matter at the moment.
Modified: modules/international/trunk/api/src/test/java/org/jboss/seam/international/status/builder/TemplateMessageTest.java
===================================================================
--- modules/international/trunk/api/src/test/java/org/jboss/seam/international/status/builder/TemplateMessageTest.java 2010-05-24 15:59:12 UTC (rev 12782)
+++ modules/international/trunk/api/src/test/java/org/jboss/seam/international/status/builder/TemplateMessageTest.java 2010-05-24 16:00:44 UTC (rev 12783)
@@ -41,47 +41,47 @@
* @author <a href="mailto:lincolnbaxter at gmail.com">Lincoln Baxter, III</a>
*
*/
-//@RunWith(Arquillian.class)
+ at RunWith(Arquillian.class)
public class TemplateMessageTest
{
-// @Deployment
-// public static Archive<?> createTestArchive()
-// {
-// return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MessageFactory.class, Bundles.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
-// }
-//
-// @Inject
-// MessageFactory factory;
+ @Deployment
+ public static Archive<?> createTestArchive()
+ {
+ return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MessageFactory.class, Bundles.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ }
+ @Inject
+ MessageFactory factory;
+
@Test
public void testParameterizedTemplate() throws Exception
{
-// String expected = "There are 5 cars, and they are all green; green is the best color.";
-// TemplateMessage builder = factory.info("There are {0} cars, and they are all {1}; {1} is the best color.", 5, "green");
-// assertEquals(expected, builder.build().getText());
+ String expected = "There are 5 cars, and they are all green; green is the best color.";
+ TemplateMessage builder = factory.info("There are {0} cars, and they are all {1}; {1} is the best color.", 5, "green");
+ assertEquals(expected, builder.build().getText());
}
-// @Test
-// public void testParameterizedTemplateInsertsParamNumbersIfNotEnoughParamValues() throws Exception
-// {
-// String expected = "There are 5 cars, and they are all {1}; {1} is the best color.";
-// TemplateMessage builder = factory.warn("There are {0} cars, and they are all {1}; {1} is the best color.", 5);
-// assertEquals(expected, builder.build().getText());
-// }
-//
-// @Test
-// public void testPlainTextTemplate() throws Exception
-// {
-// String expected = "There are 5 cars, and they are all green; green is the best color.";
-// TemplateMessage builder = factory.error("There are 5 cars, and they are all green; green is the best color.");
-// assertEquals(expected, builder.build().getText());
-// }
-//
-// @Test
-// public void testPlainTextTemplateWithParamsIsUnmodified() throws Exception
-// {
-// String expected = "There are 5 cars, and they are all green; green is the best color.";
-// TemplateMessage builder = factory.fatal("There are 5 cars, and they are all green; green is the best color.", "blue", "red", 6);
-// assertEquals(expected, builder.build().getText());
-// }
+ @Test
+ public void testParameterizedTemplateInsertsParamNumbersIfNotEnoughParamValues() throws Exception
+ {
+ String expected = "There are 5 cars, and they are all {1}; {1} is the best color.";
+ TemplateMessage builder = factory.warn("There are {0} cars, and they are all {1}; {1} is the best color.", 5);
+ assertEquals(expected, builder.build().getText());
+ }
+
+ @Test
+ public void testPlainTextTemplate() throws Exception
+ {
+ String expected = "There are 5 cars, and they are all green; green is the best color.";
+ TemplateMessage builder = factory.error("There are 5 cars, and they are all green; green is the best color.");
+ assertEquals(expected, builder.build().getText());
+ }
+
+ @Test
+ public void testPlainTextTemplateWithParamsIsUnmodified() throws Exception
+ {
+ String expected = "There are 5 cars, and they are all green; green is the best color.";
+ TemplateMessage builder = factory.fatal("There are 5 cars, and they are all green; green is the best color.", "blue", "red", 6);
+ assertEquals(expected, builder.build().getText());
+ }
}
More information about the seam-commits
mailing list