Updated and add tests function and more

This commit is contained in:
Sambo Chea 2020-07-03 12:05:07 +07:00
parent 913590acad
commit 57363df12c
3 changed files with 27 additions and 1 deletions

View File

@ -22,7 +22,9 @@ repositories {
dependencies {
// import a BOM
implementation platform('org.springframework.boot:spring-boot-dependencies:2.3.0.RELEASE')
implementation platform('org.springframework.boot:spring-boot-dependencies:2.3.1.RELEASE')
implementation 'com.cubetiqs.libra:parent:1.0-20200703.050136-4'
implementation 'org.apache.logging.log4j:log4j-api'
implementation 'org.apache.logging.log4j:log4j-core'

View File

@ -1,5 +1,6 @@
package com.cubetiqs.logging;
import com.cubetiqs.exception.RException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -15,4 +16,8 @@ public class Log {
public static Logger getLogger(Class<?> clazz) {
return LogManager.getLogger(clazz);
}
public static Throwable exception() throws RException {
throw new RException("just testing with this exception...!");
}
}

View File

@ -0,0 +1,19 @@
package com.cubetiqs.logging;
import com.cubetiqs.assertion.Tests;
import org.apache.logging.log4j.Logger;
import org.junit.Test;
public class TestLogging {
private final Logger logger
= Log.getLogger(getClass());
@Test
public void testLogging() {
logger.fatal("Sambo Chea and {}", "Hey Hey");
}
@Test
public void tesException() {
Tests.isTrue(1 == 1, "this is not true");
}
}