package com.tandbergtv.validation;

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import junit.framework.TestCase;

import com.tandbergtv.metadatamanager.validation.ValidationError;

public class ValidationErrorTest extends TestCase {

	public void testResourceLoading() {
		try {
			Locale locale = new Locale("en", "US");
			List<String> errorFields = new ArrayList<String>();
			errorFields.add("StartDate");
			List<String> errorInfo = new ArrayList<String>();
//			errorInfo.add("1");
//			errorInfo.add("255");
			ValidationError valError = new ValidationError("ERR-02",
					"/doc[1]/chapter[2]/start[1]", errorFields, errorInfo);

			String message = valError.getMessage(locale);
			System.out.println("Message for error code: " + valError.getErrorCode()
					+ " is " + message);
		} catch (RuntimeException e) {
			e.printStackTrace();
		}
	}
}
