Examples of dumpAsMap()


Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        SortedSet<Developer> developers = new TreeSet<Developer>();
        developers.add(new Developer("John", "founder"));
        developers.add(new Developer("Karl", "user"));
        bean.setDevelopers(developers);
        Yaml yaml = new Yaml();
        String output = yaml.dumpAsMap(bean);
        // System.out.println(output);
        String etalon = Util.getLocalResource("examples/set-bean-1.yaml");
        assertEquals(etalon, output);
    }
View Full Code Here

Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        developers.add(new Developer("John", "founder"));
        developers.add(new Developer("Karl", "user"));
        developers.add(new SuperDeveloper("Bill", "super"));
        bean.setDevelopers(developers);
        Yaml yaml = new Yaml();
        String output = yaml.dumpAsMap(bean);
        // System.out.println(output);
        String etalon = Util.getLocalResource("examples/set-bean-6.yaml");
        assertEquals(etalon, output);
    }
View Full Code Here

Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        developers.add(new Developer("Fred", "creator"));
        developers.add(new Developer("John", "committer"));
        bean.developers = developers;
        bean.setName("Bean123");
        Yaml yaml = new Yaml();
        String output = yaml.dumpAsMap(bean);
        // System.out.println(output);
        String etalon = Util.getLocalResource("examples/list-bean-1.yaml");
        assertEquals(etalon, output);
    }
View Full Code Here

Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        Map<String, Developer2> developers = new LinkedHashMap<String, Developer2>();
        developers.put("team1", new Developer2("Fred", "creator"));
        developers.put("team2", new Developer2("John", "committer"));
        bean.setDevelopers(developers);
        Yaml yaml = new Yaml();
        String output = yaml.dumpAsMap(bean);
        // System.out.println(output);
        String etalon = Util.getLocalResource("examples/map-bean-10.yaml");
        assertEquals(etalon, output);
    }
View Full Code Here

Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        developers.put("team1", new Developer2("Fred", "creator"));
        developers.put("team2", new Developer2("John", "committer"));
        developers.put("team3", new Developer222("Bill", "head"));
        bean.setDevelopers(developers);
        Yaml yaml = new Yaml();
        String output = yaml.dumpAsMap(bean);
        // System.out.println(output);
        String etalon = Util.getLocalResource("examples/map-bean-11.yaml");
        assertEquals(etalon, output);
    }
View Full Code Here

Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        Map<Color, Developer2> developers = new LinkedHashMap<Color, Developer2>();
        developers.put(Color.WHITE, new Developer2("Fred", "creator"));
        developers.put(Color.BLACK, new Developer2("John", "committer"));
        bean.setDevelopers(developers);
        Yaml yaml = new Yaml();
        String output = yaml.dumpAsMap(bean);
        // System.out.println(output);
        String etalon = Util.getLocalResource("examples/map-bean-12.yaml");
        assertEquals(etalon, output);
    }
View Full Code Here

Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        developers.put(Color.WHITE, new Developer2("Fred", "creator"));
        developers.put(Color.RED, new SuperMan("Jason", "contributor", true));
        developers.put(Color.BLACK, new Developer2("John", "committer"));
        bean.setDevelopers(developers);
        Yaml yaml = new Yaml();
        String output = yaml.dumpAsMap(bean);
        // System.out.println(output);
        String etalon = Util.getLocalResource("examples/map-bean-13.yaml");
        assertEquals(etalon, output);
        // load
        Yaml beanLoader = new Yaml();
View Full Code Here

Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        GenericArray ga = new GenericArray();
        ArrayBean bean = new ArrayBean();
        bean.setId("ID556677");
        bean.setGa(ga);
        Yaml dumper = new Yaml();
        String doc = dumper.dumpAsMap(bean);
        // System.out.println(doc);
        assertEquals(Util.getLocalResource("javabeans/genericArray-1.yaml"), doc);
        //
        Yaml beanLoader = new Yaml();
        if (GenericsBugDetector.isProperIntrospection()) {
View Full Code Here

Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        Nest home = new Nest();
        home = new Nest();
        home.setHeight(3);
        bird.setHome(home);
        Yaml yaml = new Yaml();
        String output = yaml.dumpAsMap(bird);
        Bird parsed;
        String javaVendor = System.getProperty("java.vm.name");
        Yaml loader = new Yaml();
        if (GenericsBugDetector.isProperIntrospection()) {
            // no global tags
View Full Code Here

Examples of org.yaml.snakeyaml.Yaml.dumpAsMap()

        ov.setValues(prop2values);
        ov.setPossible(props);

        Yaml dumper = new Yaml();
        String dumpedStr = dumper.dumpAsMap(ov);
        Yaml loader = new Yaml();
        ObjectValues ov2 = loader.loadAs(dumpedStr, ObjectValues.class);

        assertEquals(ov.getObject(), ov2.getObject());
        assertEquals(ov.getValues(), ov2.getValues());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.