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。

  • 相关阅读:
    报错18:28:21: Debugging starts QLayout: Attempting to add QLayout ““ to MainWindow “MainWindow“, which
    春 景
    sysTime(系统毫秒)
    balabala视频格式转换器
    tasklist /FI命令结论
    QFileSystemWatcher
    Qfileinfo
    Qdir
    欢迎光临我的普吉岛芭东海滩公寓
    使用ArcGIS GP服务之一框架介绍
  • 原文地址:https://www.cnblogs.com/Twink1900/p/4461531.html
Copyright © 2011-2022 走看看