Package helloworld.creational.singleton

Source Code of helloworld.creational.singleton.HelloWorldSingletonTest

package helloworld.creational.singleton;

import helloworld.HelloWorld;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

/**
* @author yihua.huang@dianping.com
*/
public class HelloWorldSingletonTest {

    @Test
    public void testHelloWorldSingleton(){
        HelloWorld helloWorld = HelloWorldSingleton.instance();
        assertThat(helloWorld.helloWorld(),is("Hello Singleton!"));
    }
}
TOP

Related Classes of helloworld.creational.singleton.HelloWorldSingletonTest

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.