Update the toolkits for Java quick test during OA and code checking

This commit is contained in:
YuCheng Hu 2023-09-03 10:26:51 -04:00 committed by honeymoose
parent 080fd2df6d
commit bc597e93c2
10 changed files with 192 additions and 205 deletions

View File

@ -16,23 +16,18 @@
</parent> </parent>
<dependencies> <dependencies>
<!-- UTILS -->
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.projectlombok</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>lombok</artifactId>
<version>3.11</version> <version>${lombok.version}</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency> <dependency>
<groupId>joda-time</groupId> <groupId>joda-time</groupId>
<artifactId>joda-time</artifactId> <artifactId>joda-time</artifactId>
<version>2.10.10</version> <version>${joda-time.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.persistence</groupId> <groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId> <artifactId>javax.persistence-api</artifactId>

View File

@ -1,4 +1,4 @@
package com.ossez.codebank.algorithm; package com.ossez.toolkits.codebank;
import java.util.Properties; import java.util.Properties;

View File

@ -1,4 +1,4 @@
package com.ossez.codebank.algorithm.objplusclass; package com.ossez.toolkits.codebank.algorithm.objplusclass;
/** /**
* *

View File

@ -1,4 +1,4 @@
package com.ossez.codebank.algorithm.overview; package com.ossez.toolkits.codebank.algorithm.overview;
/** /**
* Java Tutorial * Java Tutorial

View File

@ -1,4 +1,4 @@
package com.ossez.codebank.algorithm.overview; package com.ossez.toolkits.codebank.algorithm.overview;
/** /**
* Java Tutorial * Java Tutorial

View File

@ -1,36 +0,0 @@
package com.ossez.toolkits.codebank.tests;
import org.apache.commons.math3.util.FastMath;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* @author YuCheng
*
*/
public class BitOperationTest {
private final static Logger logger = LoggerFactory.getLogger(BitOperationTest.class);
/**
* 35 https://www.lintcode.com/problem/reverse-linked-list/description
*/
@Test
public void testInt2Bit() {
logger.debug("BEGIN");
System.out.println(Integer.toBinaryString(5));
System.out.println(Integer.toBinaryString(2));
System.out.println(Integer.toBinaryString(2 << 2));
System.out.println(Integer.parseInt(Integer.toBinaryString(2 << 2), 2));
System.out.println(5 / 3);
System.out.println(5 % 3);
FastMath.pow(2, 3);
}
}

View File

@ -0,0 +1,31 @@
package com.ossez.toolkits.codebank.tests;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
/**
* @author YuCheng
*/
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@Slf4j
public class EmptyQuickTest {
@BeforeEach
protected void setUp() throws Exception {
}
@AfterEach
protected void tearDown() throws Exception {
}
@Test
public void testMain() {
log.info("TEST MAIN - BEGIN");
}
}

View File

@ -1,4 +1,4 @@
package com.ossez.codebank.algorithm.tests; package com.ossez.toolkits.codebank.tests.algorithm;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.junit.Test; import org.junit.Test;

View File

@ -1,4 +1,4 @@
package com.ossez.codebank.algorithm.tests; package com.ossez.toolkits.codebank.tests.algorithm;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@ -1,9 +1,6 @@
package com.ossez.toolkits.codebank.tests; package com.ossez.toolkits.codebank.tests.interview;
import com.google.api.gbase.client.NumberUnit;
import com.ibm.icu.impl.CharTrie;
import com.ossez.toolkits.codebank.common.model.request.TopicRequest; import com.ossez.toolkits.codebank.common.model.request.TopicRequest;
import org.apache.commons.lang3.CharUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;