Examples of queueClassForReplacement()


Examples of a.org.fakereplace.testsuite.shared.RemoteClassReplacer.queueClassForReplacement()

    @Test
    public void testChangingJaxbModel() throws Exception {
        String result = performCall("hellopath/helloworld");
        Assert.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><jaxbModel><first>John</first></jaxbModel>", result);
        RemoteClassReplacer r = new RemoteClassReplacer();
        r.queueClassForReplacement(HelloWorldResource.class, HelloWorldResource1.class);
        r.queueClassForReplacement(JaxbModel.class, JaxbModel1.class);
        r.replaceQueuedClasses(DEPLOYMENT_NAME);
        result = performCall("hellopath/helloworld");
        Assert.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><jaxbModel><first>John</first><last>Citizen</last></jaxbModel>", result);
    }
View Full Code Here

Examples of a.org.fakereplace.testsuite.shared.RemoteClassReplacer.queueClassForReplacement()

    public void testChangingJaxbModel() throws Exception {
        String result = performCall("hellopath/helloworld");
        Assert.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><jaxbModel><first>John</first></jaxbModel>", result);
        RemoteClassReplacer r = new RemoteClassReplacer();
        r.queueClassForReplacement(HelloWorldResource.class, HelloWorldResource1.class);
        r.queueClassForReplacement(JaxbModel.class, JaxbModel1.class);
        r.replaceQueuedClasses(DEPLOYMENT_NAME);
        result = performCall("hellopath/helloworld");
        Assert.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><jaxbModel><first>John</first><last>Citizen</last></jaxbModel>", result);
    }
}
View Full Code Here

Examples of a.org.fakereplace.testsuite.shared.RemoteClassReplacer.queueClassForReplacement()

    public void testClientProxyReplacement() throws InterruptedException, NamingException {
        final RemoteInterface remote = (RemoteInterface) initialContext.lookup("ejb:/test/RemoteEjb!" + RemoteInterface.class.getName());

        remote.setValue("Hello CDI");
        final RemoteClassReplacer replacer = new RemoteClassReplacer();
        replacer.queueClassForReplacement(AppScopedBean.class, AppScopedBean1.class);
        replacer.queueClassForReplacement(RemoteEjb.class, RemoteEjb1.class);
        replacer.replaceQueuedClasses("test.jar");
        Assert.assertEquals("Hello CDI", remote.getValue());

    }
View Full Code Here

Examples of a.org.fakereplace.testsuite.shared.RemoteClassReplacer.queueClassForReplacement()

        final RemoteInterface remote = (RemoteInterface) initialContext.lookup("ejb:/test/RemoteEjb!" + RemoteInterface.class.getName());

        remote.setValue("Hello CDI");
        final RemoteClassReplacer replacer = new RemoteClassReplacer();
        replacer.queueClassForReplacement(AppScopedBean.class, AppScopedBean1.class);
        replacer.queueClassForReplacement(RemoteEjb.class, RemoteEjb1.class);
        replacer.replaceQueuedClasses("test.jar");
        Assert.assertEquals("Hello CDI", remote.getValue());

    }
}
View Full Code Here

Examples of a.org.fakereplace.testsuite.shared.RemoteClassReplacer.queueClassForReplacement()

    public void testAddingColumn() throws NamingException {
        RemoteEmployee ejb = (RemoteEmployee)initialContext.lookup("ejb:/Hibernate4AddColumnTestCase/" + EmployeeEjb.class.getSimpleName() + "!" + RemoteEmployee.class.getName());
        ejb.saveEntity(1);
        Assert.assertEquals("1-name", ejb.getEntityDesc(1));
        final RemoteClassReplacer replacer = new RemoteClassReplacer();
        replacer.queueClassForReplacement(Employee.class, Employee1.class);
        replacer.queueClassForReplacement(EmployeeEjb.class, EmployeeEjb1.class);
        replacer.addNewClass(AddedEntity.class);
        replacer.replaceQueuedClasses(DEPLOYMENT_NAME);
        ejb.saveEntity(2);
        Assert.assertEquals("2-name-address", ejb.getEntityDesc(2));
View Full Code Here

Examples of a.org.fakereplace.testsuite.shared.RemoteClassReplacer.queueClassForReplacement()

        RemoteEmployee ejb = (RemoteEmployee)initialContext.lookup("ejb:/Hibernate4AddColumnTestCase/" + EmployeeEjb.class.getSimpleName() + "!" + RemoteEmployee.class.getName());
        ejb.saveEntity(1);
        Assert.assertEquals("1-name", ejb.getEntityDesc(1));
        final RemoteClassReplacer replacer = new RemoteClassReplacer();
        replacer.queueClassForReplacement(Employee.class, Employee1.class);
        replacer.queueClassForReplacement(EmployeeEjb.class, EmployeeEjb1.class);
        replacer.addNewClass(AddedEntity.class);
        replacer.replaceQueuedClasses(DEPLOYMENT_NAME);
        ejb.saveEntity(2);
        Assert.assertEquals("2-name-address", ejb.getEntityDesc(2));
    }
View Full Code Here

Examples of a.org.fakereplace.testsuite.shared.RemoteClassReplacer.queueClassForReplacement()

    @Test
    public void testJaxRsWithNoApplication() throws Exception {
        String result = performCall("hellopath/helloworld");
        assertEquals("Hello World!", result);
        RemoteClassReplacer r = new RemoteClassReplacer();
        r.queueClassForReplacement(HelloWorldResource.class, HelloWorldResource1.class);
        r.addNewClass(JaxbModel.class);
        r.replaceQueuedClasses(DEPLOYMENT_NAME);
        result = performCall("hellopath/helloworld");
        Assert.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><jaxbModel><first>John</first><last>Citizen</last></jaxbModel>", result);
    }
View Full Code Here

Examples of a.org.fakereplace.testsuite.shared.RemoteClassReplacer.queueClassForReplacement()

        HttpResponse result = client.execute(new HttpGet(url.toExternalForm() + "index.jsf"));
        String content = HttpUtils.getContent(result);
        Assert.assertTrue(content, content.contains("FIRST: a"));
        Assert.assertFalse(content, content.contains("SECOND: b"));
        final RemoteClassReplacer replacer = new RemoteClassReplacer();
        replacer.queueClassForReplacement(AppScopedBean.class, AppScopedBean1.class);
        replacer.queueResourceForReplacement(getClass(), "index.xhtml", "index1.xhtml");
        replacer.replaceQueuedClasses("test.war");
        result = client.execute(new HttpGet(url.toExternalForm() + "index.jsf"));
        content = HttpUtils.getContent(result);
View Full Code Here

Examples of a.org.fakereplace.testsuite.shared.RemoteClassReplacer.queueClassForReplacement()

        HttpResponse result = client.execute(new HttpGet(url.toExternalForm() + "index.jsf"));
        String content = HttpUtils.getContent(result);
        Assert.assertTrue(content, content.contains("FIRST: a"));
        Assert.assertFalse(content, content.contains("SECOND: b"));
        final RemoteClassReplacer replacer = new RemoteClassReplacer();
        replacer.queueClassForReplacement(AppScopedBean.class, AppScopedBean1.class);
        replacer.queueResourceForReplacement(getClass(), "index.xhtml", "index1.xhtml");
        replacer.replaceQueuedClasses("test.war");
        result = client.execute(new HttpGet(url.toExternalForm() + "index.jsf"));
        content = HttpUtils.getContent(result);
View Full Code Here

Examples of a.org.fakereplace.testsuite.shared.RemoteClassReplacer.queueClassForReplacement()

    public void testAddingColumn() throws NamingException {
        RemoteEmployee ejb = (RemoteEmployee)initialContext.lookup("ejb:/Hibernate4AddColumnTestCase/" + EmployeeEjb.class.getSimpleName() + "!" + RemoteEmployee.class.getName());
        ejb.saveEntity(1);
        Assert.assertEquals("1-name", ejb.getEntityDesc(1));
        final RemoteClassReplacer replacer = new RemoteClassReplacer();
        replacer.queueClassForReplacement(Employee.class, Employee1.class);
        replacer.queueClassForReplacement(EmployeeEjb.class, EmployeeEjb1.class);
        replacer.replaceQueuedClasses(DEPLOYMENT_NAME);
        ejb.saveEntity(2);
        Assert.assertEquals("2-name-address", ejb.getEntityDesc(2));
    }
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.