Examples of SettingsNode


Examples of org.gradle.gradleplugin.foundation.settings.SettingsNode

        //now try it with one that doesn't exist. We should get the default value
        assertEquals(44, rootNode.getValueOfChildAsInt("nonexistent", 44));

        //now add a single node but don't give it a value (which means its null)
        SettingsNode valuelessNode = rootNode.addChild("valueless");
        assertNull(valuelessNode.getValue());

        //now try to get its value. We should get the default value
        assertEquals(17, rootNode.getValueOfChildAsInt("valueless", 17));

        //now add a single node that has an illegal value
        SettingsNode illegalNode = rootNode.addChild("illegal");
        illegalNode.setValue("abcdefg");

        //now try to get its value. We should get the default value
        assertEquals(333, rootNode.getValueOfChildAsInt("illegal", 333));
    }
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.