ruper2/src/test/core/org/krysalis/ruper2/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/test/core/org/krysalis/ruper2/util/text
In directory sc8-pr-cvs1:/tmp/cvs-serv30481/src/test/core/org/krysalis/ruper2/util/text

Added Files:
	MessageTests.java 
Log Message:
Avoid clash with existing Ruper...

--- NEW FILE: MessageTests.java ---
package org.krysalis.ruper2.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 testBundle() throws Exception {
		assertNotNull("Has a Resource Bundle", Messages.l_resourceBundle);
	}

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

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

	public void testForObsolete() throws Exception {
		List messageCodes1 = MessageConstants.getCodes();
		List messageCodes2 = Messages.getCodes();

		for (Iterator i = messageCodes1.iterator(); i.hasNext();) {
			String code = (String) i.next();

			assertTrue("Obsolete : " + code, messageCodes2.contains(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.