src/test/java/com/yuanlrc/base/AppTest.java
(完整代码) 851Bpackage com.yuanlrc.base;
import static org.junit.Assert.assertTrue;
import com.yuanlrc.base.util.DateUtil;
import org.junit.Test;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Unit test for simple App.
*/
public class AppTest
{
/**
* Rigorous Test :-)
*/
@Test
public void shouldAnswerWithTrue()
{
assertTrue( true );
}
@Test
public void testDate() throws ParseException {
String currentDate="2021-12-02 16:26:58";
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date();
Date parse = simpleDateFormat.parse(currentDate);
int i = DateUtil.ShowTimeInterval(date, parse);
System.out.println(i);
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。