// Path: src/com/esotericsoftware/yamlbeans/YamlConfig.java
// public static enum Quote {
// 	NONE('\0'), SINGLE('\''), DOUBLE('"'), LITERAL('|'), FOLDED('>');
// 
// 	char c;
// 
// 	Quote (char c) {
// 		this.c = c;
// 	}
// 
// 	public char getStyle() {
// 		return c;
// 	}
// }
// 
// Path: src/com/esotericsoftware/yamlbeans/YamlReader.java
// public class YamlReaderException extends YamlException {
// 	public YamlReaderException (String message, Throwable cause) {
// 		super("Line " + parser.getLineNumber() + ", column " + parser.getColumn() + ": " + message, cause);
// 	}
// 
// 	public YamlReaderException (String message) {
// 		this(message, null);
// 	}
// }
// 
// Path: src/com/esotericsoftware/yamlbeans/scalar/DateSerializer.java
// public class DateSerializer implements ScalarSerializer<Date> {
// 	private DateTimeParser dateParser = new DateTimeParser();
// 
// 	public Date read (String value) throws YamlException {
// 		try {
// 			return dateParser.parse(value);
// 		} catch (ParseException ex) {
// 			throw new YamlException("Invalid date: " + value, ex);
// 		}
// 	}
// 
// 	public String write (Date object) throws YamlException {
// 		return dateParser.format(object);
// 	}
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
import org.junit.Before;
import org.junit.Test;
import com.esotericsoftware.yamlbeans.YamlConfig.Quote;
import com.esotericsoftware.yamlbeans.YamlReader.YamlReaderException;
import com.esotericsoftware.yamlbeans.scalar.DateSerializer;
		try {
			yamlConfig.setPropertyDefaultType(TestObject.class, null, Date.class);
		} catch (IllegalArgumentException e) {
			assertEquals("propertyName cannot be null.", e.getMessage());
		}

		try {
			yamlConfig.setPropertyDefaultType(TestObject.class, "object", null);
		} catch (IllegalArgumentException e) {
			assertEquals("defaultType cannot be null.", e.getMessage());
		}

		try {
			yamlConfig.setPropertyDefaultType(TestObject.class, "aaa", Date.class);
		} catch (IllegalArgumentException e) {
			assertTrue(e.getMessage().contains("does not have a property named"));
		}
	}

	@Test
	public void testSetBeanProperties() throws YamlException {
		String yaml = "a: test";
		YamlReader yamlReader = new YamlReader(yaml, yamlConfig);
		TestObject testObject = yamlReader.read(TestObject.class);
		assertEquals("test", testObject.a);

		yamlConfig.setBeanProperties(false);
		yamlReader = new YamlReader(yaml, yamlConfig);
		try {
			yamlReader.read(TestObject.class);
// Path: src/com/esotericsoftware/yamlbeans/YamlConfig.java
// public static enum Quote {
// 	NONE('\0'), SINGLE('\''), DOUBLE('"'), LITERAL('|'), FOLDED('>');
// 
// 	char c;
// 
// 	Quote (char c) {
// 		this.c = c;
// 	}
// 
// 	public char getStyle() {
// 		return c;
// 	}
// }
// 
// Path: src/com/esotericsoftware/yamlbeans/YamlReader.java
// public class YamlReaderException extends YamlException {
// 	public YamlReaderException (String message, Throwable cause) {
// 		super("Line " + parser.getLineNumber() + ", column " + parser.getColumn() + ": " + message, cause);
// 	}
// 
// 	public YamlReaderException (String message) {
// 		this(message, null);
// 	}
// }
// 
// Path: src/com/esotericsoftware/yamlbeans/scalar/DateSerializer.java
// public class DateSerializer implements ScalarSerializer<Date> {
// 	private DateTimeParser dateParser = new DateTimeParser();
// 
// 	public Date read (String value) throws YamlException {
// 		try {
// 			return dateParser.parse(value);
// 		} catch (ParseException ex) {
// 			throw new YamlException("Invalid date: " + value, ex);
// 		}
// 	}
// 
// 	public String write (Date object) throws YamlException {
// 		return dateParser.format(object);
// 	}
// }


// Path: test/com/esotericsoftware/yamlbeans/YamlConfigTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
import org.junit.Before;
import org.junit.Test;
import com.esotericsoftware.yamlbeans.YamlConfig.Quote;
import com.esotericsoftware.yamlbeans.YamlReader.YamlReaderException;
import com.esotericsoftware.yamlbeans.scalar.DateSerializer;

		try {
			yamlConfig.setPropertyDefaultType(TestObject.class, null, Date.class);
		} catch (IllegalArgumentException e) {
			assertEquals("propertyName cannot be null.", e.getMessage());
		}

		try {
			yamlConfig.setPropertyDefaultType(TestObject.class, "object", null);
		} catch (IllegalArgumentException e) {
			assertEquals("defaultType cannot be null.", e.getMessage());
		}

		try {
			yamlConfig.setPropertyDefaultType(TestObject.class, "aaa", Date.class);
		} catch (IllegalArgumentException e) {
			assertTrue(e.getMessage().contains("does not have a property named"));
		}
	}

	@Test
	public void testSetBeanProperties() throws YamlException {
		String yaml = "a: test";
		YamlReader yamlReader = new YamlReader(yaml, yamlConfig);
		TestObject testObject = yamlReader.read(TestObject.class);
		assertEquals("test", testObject.a);

		yamlConfig.setBeanProperties(false);
		yamlReader = new YamlReader(yaml, yamlConfig);
		try {
			yamlReader.read(TestObject.class);
		} catch (YamlReaderException e) {