Examples of helloworld()


Examples of helloworld.HelloWorld.helloWorld()

    @Test
    public void testHelloWorldFlyWeight(){
        HelloWorld helloWorld = HelloWorldFlyWeightFactory.instance().createHelloWorld("Hello Flyweight!");
        assertThat(helloWorld.helloWorld(),is("Hello Flyweight!"));
        helloWorld = HelloWorldFlyWeightFactory.instance().createHelloWorld("Hello Flyweight!");
        assertThat(helloWorld.helloWorld(),is("Hello Flyweight!"));
    }
}
View Full Code Here

Examples of helloworld.HelloWorld.helloWorld()

public class HelloWorldAdapterTest {

    @Test
    public void testHelloWorldAdapter(){
        HelloWorld adapterHelloWorld = new HelloWorldAdapter(new HelloAdapterDesignPattern());
        assertThat(adapterHelloWorld.helloWorld(),is("Hello Adapter!"));
    }
}
View Full Code Here

Examples of helloworld.HelloWorld.helloWorld()

public class HelloWorldFacadeTest {

    @Test
    public void testHelloWorldFacade(){
        HelloWorld facadeHelloWorld = HelloWorldFacade.instance().facadeHelloWorld();
        assertThat(facadeHelloWorld.helloWorld(),is("Hello Facade!"));
    }
}
View Full Code Here

Examples of helloworld.HelloWorld.helloWorld()

public class CompositeHelloWorldTest {

    @Test
    public void testCompositeHelloWorld(){
        HelloWorld emptyCompositeHelloWorld = new CompositeHelloWorld();
        assertThat(emptyCompositeHelloWorld.helloWorld(),isEmptyString());
        HelloWorld compositeHelloWorld = new CompositeHelloWorld(new CompositeHelloWorld.DefaultHelloWorld());
        assertThat(compositeHelloWorld.helloWorld(),is("Hello Composite!"));
    }
}
View Full Code Here

Examples of helloworld.HelloWorld.helloWorld()

    @Test
    public void testCompositeHelloWorld(){
        HelloWorld emptyCompositeHelloWorld = new CompositeHelloWorld();
        assertThat(emptyCompositeHelloWorld.helloWorld(),isEmptyString());
        HelloWorld compositeHelloWorld = new CompositeHelloWorld(new CompositeHelloWorld.DefaultHelloWorld());
        assertThat(compositeHelloWorld.helloWorld(),is("Hello Composite!"));
    }
}
View Full Code Here

Examples of helloworld.behavioral.chain_of_responsibility.HelloWorldHandler.helloWorld()

        System.out.println("====================================");
        System.out.println("We are behavioral patterns!");

        System.out.println("13. Chain of Responsibility: ");
        HelloWorldHandler helloWorldChainOfResponsibility = new HelloWorldInterjectionHandler().setNext(new HelloWorldObjectHandler());
        System.out.println(helloWorldChainOfResponsibility.helloWorld());

        System.out.println("14. Command: ");
        Command helloWorldCommand = new HelloWorldPrintCommand();
        helloWorldCommand.execute();
View Full Code Here

Examples of helloworld.behavioral.mediator.HelloWorldObject.helloWorld()

        HelloWorldInterjection helloWorldInterjection = new HelloWorldInterjection();
        HelloWorldObject helloWorldObject = new HelloWorldObject();
        HelloWorldMediator helloWorldMediator = new HelloWorldMediator(helloWorldInterjection, helloWorldObject);
        helloWorldInterjection.setHelloWorldMediator(helloWorldMediator);
        helloWorldObject.setHelloWorldMediator(helloWorldMediator);
        System.out.println(helloWorldObject.helloWorld());

        System.out.println("18. Memento: ");
        HelloWorldMementoOriginator helloWorldMementoOriginator = new HelloWorldMementoOriginator();
        HelloWorldMementoOriginator.Memento memento = helloWorldMementoOriginator.set("Hello Memento!").saveToMemento();
        helloWorldMementoOriginator.set("Hello Whatever!");
View Full Code Here

Examples of helloworld.behavioral.memento.HelloWorldMementoOriginator.helloWorld()

        System.out.println("18. Memento: ");
        HelloWorldMementoOriginator helloWorldMementoOriginator = new HelloWorldMementoOriginator();
        HelloWorldMementoOriginator.Memento memento = helloWorldMementoOriginator.set("Hello Memento!").saveToMemento();
        helloWorldMementoOriginator.set("Hello Whatever!");
        helloWorldMementoOriginator.restoreFromMemento(memento);
        System.out.println(helloWorldMementoOriginator.helloWorld());

        System.out.println("19. Observer: ");
        Subject subject = new Subject().attach(new HelloWorldObserver());
        subject.notifyObservers();
View Full Code Here

Examples of helloworld.behavioral.strategy.HelloWorldStrategyContext.helloWorld()

        HelloWorld stateHelloWorld = helloWorldStateContext.appendWord("Hello").appendWord("State");
        System.out.println(stateHelloWorld.helloWorld());

        System.out.println("21. Strategy: ");
        HelloWorldStrategyContext helloWorldStrategyContext = new HelloWorldStrategyContext(new DesignPatternHelloWorldStrategy());
        System.out.println(helloWorldStrategyContext.helloWorld());

        System.out.println("22. Template Method: ");
        HelloWorld templateMethodHelloWorld = new TemplateMethodHelloWorld();
        System.out.println(templateMethodHelloWorld.helloWorld());
View Full Code Here

Examples of helloworld.behavioral.template_method.TemplateMethodHelloWorld.helloWorld()

        HelloWorldStrategyContext helloWorldStrategyContext = new HelloWorldStrategyContext(new DesignPatternHelloWorldStrategy());
        System.out.println(helloWorldStrategyContext.helloWorld());

        System.out.println("22. Template Method: ");
        HelloWorld templateMethodHelloWorld = new TemplateMethodHelloWorld();
        System.out.println(templateMethodHelloWorld.helloWorld());

        System.out.println("23. Visitor: ");
        HelloWorldCharacterElements helloWorldCharacterElements = new HelloWorldCharacterElements("Hello Visitor!".toCharArray());
        HelloWorldCharacterVisitor helloWorldCharacterVisitor = new HelloWorldCharacterVisitor();
        helloWorldCharacterElements.accept(helloWorldCharacterVisitor);
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.