Updated and add tests function and more
This commit is contained in:
parent
913590acad
commit
57363df12c
@ -22,7 +22,9 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// import a BOM
|
// 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-api'
|
||||||
implementation 'org.apache.logging.log4j:log4j-core'
|
implementation 'org.apache.logging.log4j:log4j-core'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.cubetiqs.logging;
|
package com.cubetiqs.logging;
|
||||||
|
|
||||||
|
import com.cubetiqs.exception.RException;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
@ -15,4 +16,8 @@ public class Log {
|
|||||||
public static Logger getLogger(Class<?> clazz) {
|
public static Logger getLogger(Class<?> clazz) {
|
||||||
return LogManager.getLogger(clazz);
|
return LogManager.getLogger(clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Throwable exception() throws RException {
|
||||||
|
throw new RException("just testing with this exception...!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
19
src/test/java/com/cubetiqs/logging/TestLogging.java
Normal file
19
src/test/java/com/cubetiqs/logging/TestLogging.java
Normal 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");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user