67,550
社区成员




<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sec.yq1012.hello</groupId>
<artifactId>hello-first</artifactId>
<version>SNAPSHOT-0.0.1</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
package com.sec.yq1012.hello;
public class Hello{
public String sayHello(String name){
return "hello:"+name;
}
public static void main(String[] args){
System.out.println("hello word!");
}
}
package com.sec.yq1012;
import static org.junit.Assert.*;
import org.junit.Test;
public class TestHello {
@Test
public void testHello(){
Hello h= new Hello();// 如果这个注释掉的话就不会报错。
//assertEquals(h.sayHello("zs"),"hello:zs");
}
}