Package net.tralfamadore.cmf

Examples of net.tralfamadore.cmf.Namespace


    @Mocked
    PageContent pageContent;

    @Test
    public void testStart() throws Exception {
        final Namespace parent = Namespace.createFromString("net.tralfamadore");

        new NonStrictExpectations() {
            {
                pageContent.getNamespace(); result = new Delegate() {
                    Namespace returnANamespace() {
                        return parent;
                    }
                };
                pageContent.getNamespaceToAdd(); result = Namespace.createFromString("net.tralfamadore.site");
            }
        };

        adminController.addNewNamespace();

        new Verifications() {
            {
                pageContent.getNamespace(); times = 1;
                pageContent.setNamespaceToAdd(new Namespace(parent, "")); times = 1;
                pageContent.getNamespaceToAdd(); times = 1;
                pageContent.setAddingNamespace(anyBoolean); times = 1;
                forEachInvocation = new Object() {
                    void validate(boolean b) {
                        assertTrue(b);
View Full Code Here


     * @param content The content component
     *
     * @return The found content, or null.
     */
    protected String getContent(Content content) {
        Namespace namespace = Namespace.createFromString(content.getNamespace());
        String name = content.getName();
        net.tralfamadore.cmf.Content c = getContentManager().loadContent(namespace, name);
        return c == null ? null : c.getContent();
    }
View Full Code Here

TOP

Related Classes of net.tralfamadore.cmf.Namespace

Copyright © 2018 www.massapicom. 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.