Package org.apache.commons.chain.impl

Examples of org.apache.commons.chain.impl.NonDelegatingCommand


    // Test ability to lookup and execute single non-delegating command
    public void testExecuteMethodLookup_1a() {

        // use default catalog
        catalog.addCommand("foo", new NonDelegatingCommand("1a"));
        command.setName("foo");

        try {
            assertTrue("Command should return true",
                       command.execute(context));
View Full Code Here


    public void testExecuteMethodLookup_1b() {

        ChainBase chain = new ChainBase();
        chain.addCommand(new DelegatingCommand("1b1"));
        chain.addCommand(new DelegatingCommand("1b2"));
        chain.addCommand(new NonDelegatingCommand("1b3"));
       
        // use default catalog
        catalog.addCommand("foo", chain);
        command.setName("foo");
View Full Code Here

    // Test ability to lookup and execute single non-delegating command
    // using the context
    public void testExecuteMethodLookup_2a() {

        // use default catalog
        catalog.addCommand("foo", new NonDelegatingCommand("2a"));
        command.setNameKey("nameKey");
        context.put("nameKey", "foo");

        try {
            assertTrue("Command should return true",
View Full Code Here

    public void testExecuteMethodLookup_2b() {

        ChainBase chain = new ChainBase();
        chain.addCommand(new DelegatingCommand("2b1"));
        chain.addCommand(new DelegatingCommand("2b2"));
        chain.addCommand(new NonDelegatingCommand("2b3"));

        // use default catalog
        catalog.addCommand("foo", chain);
        command.setNameKey("nameKey");
        context.put("nameKey", "foo");
View Full Code Here

    // Test ability to lookup and execute single non-delegating command, ignoring its result
    public void testExecuteMethodLookup_3a() {

        // use default catalog
        catalog.addCommand("foo", new NonDelegatingCommand("3a"));
        command.setIgnoreExecuteResult(true);
        command.setName("foo");

        try {
            assertFalse("Command should return false",
View Full Code Here

    // Test ability to lookup and execute single non-delegating command
    public void testExecuteMethodLookup_1a() {

        // use default catalog
        catalog.addCommand("foo", new NonDelegatingCommand("1a"));
        command.setName("foo");

        try {
            assertTrue("Command should return true",
                       command.execute(context));
View Full Code Here

    public void testExecuteMethodLookup_1b() {

        ChainBase chain = new ChainBase();
        chain.addCommand(new DelegatingCommand("1b1"));
        chain.addCommand(new DelegatingCommand("1b2"));
        chain.addCommand(new NonDelegatingCommand("1b3"));
       
        // use default catalog
        catalog.addCommand("foo", chain);
        command.setName("foo");
View Full Code Here

    // Test ability to lookup and execute single non-delegating command
    // using the context
    public void testExecuteMethodLookup_2a() {

        // use default catalog
        catalog.addCommand("foo", new NonDelegatingCommand("2a"));
        command.setNameKey("nameKey");
        context.put("nameKey", "foo");

        try {
            assertTrue("Command should return true",
View Full Code Here

    public void testExecuteMethodLookup_2b() {

        ChainBase chain = new ChainBase();
        chain.addCommand(new DelegatingCommand("2b1"));
        chain.addCommand(new DelegatingCommand("2b2"));
        chain.addCommand(new NonDelegatingCommand("2b3"));

        // use default catalog
        catalog.addCommand("foo", chain);
        command.setNameKey("nameKey");
        context.put("nameKey", "foo");
View Full Code Here

    // Test ability to lookup and execute single non-delegating command, ignoring its result
    public void testExecuteMethodLookup_3a() {

        // use default catalog
        catalog.addCommand("foo", new NonDelegatingCommand("3a"));
        command.setIgnoreExecuteResult(true);
        command.setName("foo");

        try {
            assertFalse("Command should return false",
View Full Code Here

TOP

Related Classes of org.apache.commons.chain.impl.NonDelegatingCommand

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.