当前位置:网站首页>IDEA中使用注解Test
IDEA中使用注解Test
2022-07-29 04:53:00 【星与梦想star_dream】
问题说明:
解决方案:
- 安装插件(Junit)
- 重启IDE
注意事项:
- 不要与类名相同,即类名不可以为Test
- 添加依赖(将JUnit4添加到类路径中)
- 查看lib文件夹,发现多了几个文件(成功!)
测试环节:可以不看
@Test public void test() throws ParseException { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = simpleDateFormat.parse("2022-07-28 17:43:21"); String time = simpleDateFormat.format(date); System.out.println(time); }
.
边栏推荐
- excel怎么设置行高和列宽?excel设置行高和列宽的方法
- Glory 2023 push, push code ambubk
- How to build a mobile studio network?
- Excel怎么筛选出自己想要的内容?excel表格筛选内容教程
- Common rules of makefile (make) (II)
- Opencv learning 1 (environment configuration)
- Live in small private enterprises
- Climbing the pit of traffic flow prediction (III): using pytorch to realize LSTM to predict traffic flow
- [c language] PTA 7-50 output Fahrenheit Celsius temperature conversion table
- pulsar起client客户端时(client,producer,consumer)各个配置
猜你喜欢
学术 | [LaTex]超详细Texlive2022+Tex Studio下载安装配置
Using jupyter (I), install jupyter under windows, open the browser, and modify the default opening address
How to set row height and column width in excel? The method of setting row height and column width in Excel
[QT learning notes] * insert pictures in the window
How to avoid damage of oscilloscope current probe
[untitled]
使用更灵活、更方便的罗氏线圈
Build auto.js script development environment
Solution to the fourth game of 2022 Hangzhou Electric Multi school league
Command line interactive tools (latest version) inquirer practical tutorial
随机推荐
[c language] PTA 7-49 have fun with numbers (partially correct)
Basic grammar of C language
Excel卡住了没保存怎么办?Excel还没保存但是卡住了的解决方法
How to set row height and column width in excel? The method of setting row height and column width in Excel
leetcode 763. Partition Labels 划分字母区间(中等)
学术 | [LaTex]超详细Texlive2022+Tex Studio下载安装配置
Various configurations when pulsar starts the client (client, producer, consumer)
1 sentence of code, get asp Net core binds multiple sources to the same class
Mysql:The user specified as a definer (‘root‘@‘%‘) does not exist 的解决办法
The most comprehensive promotion plan for the launch of new products
UE 在场景或UMG中播放视频
[C language] power table of 3 generated by PTA 7-53
What are the core features of the digital transformation of state-owned construction enterprises?
Recyclerview switches the focus up and down through the dpad key. When switching to the control outside the interface, the focus will jump left and right
Excel怎么筛选出自己想要的内容?excel表格筛选内容教程
1 句代码,搞定 ASP.NET Core 绑定多个源到同一个类
安装spinning up教程里与mujoco对应的gym,报错mjpro150
Leetcode 763. partition labels divide alphabetic intervals (medium)
新产品上市最全推广方案
Go面向并发的内存模型