zoukankan      html  css  js  c++  java
  • 软件管理

    public class Main {
        public String sayHello() {           
            return "Hello ZhangKexin!";
        }
        public static void main(String[] args) {
            HelloWorld helloWorld = new HelloWorld();
            System.out.println(helloWorld.Hello());
        }
    }
    public class HelloWorld {
        public String Hello() {           
            return "Hello Xu Luhan";
        }
        public static void main(String[] args) {
            HelloWorld world = new HelloWorld();
            System.out.println(world.Hello());
        }
    }
    import junit.framework.TestCase;
    
    
    public class Test extends TestCase{
        public Test(String name){
            super(name);
        }
        public static void main(String args[]){
            junit.textui.TestRunner.run(Test.class);
        }
        public void test() {
            HelloWorld world = new HelloWorld();
            assertEquals("Hello Xu Luhan", world.Hello());
        }
    }

    以上为TASK1。

    package Maven1.Maven01;
    /**
     * Hello world!
     *
     */
    public class App 
    {
        public String sayHello(){
            return "Hello Xu Luhan";
        }
        public static void main( String[] args )
        {
            App world = new App();
            System.out.println(world.sayHello());
        }
    }
    package Maven1.Maven01;
    import junit.framework.Test;
    import junit.framework.TestCase;
    import junit.framework.TestSuite;
    /**
     * Unit test for simple App.
     */
    public class AppTest 
        extends TestCase
    {
        /**
         * Create the test case
         *
         * @param testName name of the test case
         */
        public AppTest( String testName )
        {
            super( testName );
        }
        /**
         * @return the suite of tests being tested
         */
        public static Test suite()
        {
            return new TestSuite( AppTest.class );
        }
        /**
         * Rigourous Test :-)
         */
        public void testApp()
        {
            assertTrue( true );
        }
        public void testSayHello(){
            App app = new App();
            String result = app.sayHello();
            assertEquals("Hello Xu Luhan",result);
        }
    }

    以上为TASK2。

  • 相关阅读:
    linux编程 给线程起名字
    c语言的__packed__
    LINUX 命令行编辑快捷键
    linux关于bashrc与profile的区别(转)
    linux查看和修改PATH环境变量的方法
    linux 线程 pthread_create 源码 剖析
    你真的了解【HashMap】么?-一
    Oracle 基础概念
    Java数据库连接池
    JVM内存模型与垃圾回收
  • 原文地址:https://www.cnblogs.com/Twink1900/p/4461531.html
Copyright © 2011-2022 走看看