maven管理项目 + junit单元测试

This commit is contained in:
ghy committed 2021-03-02 21:35:29 +08:00
1 parent b07bf8a9f9
commit 5938be8893
9 files changed
+47 -1

No files matched your search

+2 -1
View File
@@ -1,4 +1,5 @@
.idea/
.git/
out/
min-dev-java.iml
min-dev-java.iml
target
+21
View File
@@ -0,0 +1,21 @@
<?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>min</groupId>
<artifactId>min-dev-java</artifactId>
<version>1.0</version>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+24
View File
@@ -0,0 +1,24 @@
package encoding;
import org.junit.Test;
import static org.junit.Assert.*;
import java.math.BigInteger;
/*
* @Author: hongyu guo
* @Description: 测试SizeT
* @Version: 1.0.0
* @Date: 21:27 2021/03/02
* @Copyright: MIN-Group;国家重大科技基础设施——未来网络北大实验室;深圳市信息论与未来网络重点实验室
*/
public class TestSizeT {
@Test
public void testIsEqual(){
BigInteger bigInteger = new BigInteger("3");
SizeT vlInt = new SizeT(bigInteger);
assertFalse(vlInt.isEqual(2));
assertTrue(vlInt.isEqual(3));
}
}