2011-08-28 03:12:13 +00:00
|
|
|
package com.earth2me.essentials;
|
|
|
|
|
|
|
|
import junit.framework.TestCase;
|
|
|
|
import org.yaml.snakeyaml.DumperOptions;
|
|
|
|
import org.yaml.snakeyaml.Yaml;
|
|
|
|
import org.yaml.snakeyaml.nodes.Tag;
|
|
|
|
import com.earth2me.essentials.yaml.Settings;
|
|
|
|
import org.bukkit.Location;
|
|
|
|
import org.bukkit.World.Environment;
|
|
|
|
import org.yaml.snakeyaml.constructor.Constructor;
|
|
|
|
|
|
|
|
|
|
|
|
public class YamlTest extends TestCase
|
|
|
|
{
|
|
|
|
public YamlTest()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public void testYaml()
|
|
|
|
{
|
|
|
|
final DumperOptions options = new DumperOptions();
|
|
|
|
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
|
|
|
options.setExplicitRoot(Tag.MAP);
|
|
|
|
final Yaml yaml = new Yaml(options);
|
|
|
|
//Settings settings = (Settings)yaml.load("");
|
2011-08-28 03:21:12 +00:00
|
|
|
/*Settings set1 = new Settings();
|
|
|
|
//final String dump = yaml.dump(set1);
|
|
|
|
//final Yaml yaml2 = new Yaml(new Constructor(Settings.class));
|
|
|
|
//final Settings set = (Settings)yaml2.load(dump);
|
2011-08-28 03:12:13 +00:00
|
|
|
if (set != null)
|
|
|
|
{
|
|
|
|
//assert set.getGeneral().getLocation() == null;
|
|
|
|
//assert set.equals(new Settings());
|
|
|
|
System.out.println(dump);
|
2011-08-28 03:21:12 +00:00
|
|
|
}*/
|
2011-08-28 03:12:13 +00:00
|
|
|
}
|
|
|
|
}
|