ruper2/src/java/test/core/org/krysalis/ruper/util/text MessageTests.java,NONE,1.1

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/test/core/org/krysalis/ruper/util/text
In directory sc8-pr-cvs1:/tmp/cvs-serv17764/src/java/test/core/org/krysalis/ruper/util/text

Added Files:
	MessageTests.java 
Log Message:
1) Unit test for messages
2) Fallback to "en" if messages in default locale not available
3) First stab at loading ruper.xml from a resource (classloader) not just file

--- NEW FILE: MessageTests.java ---
package org.krysalis.ruper.util.text;

import java.util.Iterator;
import java.util.List;

import junit.framework.TestCase;

/**
 * @author arb_jack
 */
public class MessageTests extends TestCase {

	public MessageTests(String name) {
		super(name);
	}

	public void testMessages() throws Exception {
		List messageCodes = MessageConstants.getCodes();

		for (Iterator i = messageCodes.iterator(); i.hasNext();) {
			String code = (String) i.next();
			assertNotNull(code, Messages.findMessage(code));
		}
	}

	public static void main(String[] args) {
		junit.textui.TestRunner.run(MessageTests.class);
	}
}




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.