File tree Expand file tree Collapse file tree 2 files changed +28
-15
lines changed
java/com/marginallyclever/nodegraphcore Expand file tree Collapse file tree 2 files changed +28
-15
lines changed Original file line number Diff line number Diff line change 11package com .marginallyclever .nodegraphcore ;
22
3- import org .junit .jupiter .api .AfterAll ;
3+ import org .junit .jupiter .api .AfterEach ;
44import org .junit .jupiter .api .Test ;
55
66import java .util .ServiceLoader ;
77
88import static org .junit .jupiter .api .Assertions .assertEquals ;
99
1010public class TestDAO4JSONFactory {
11- @ AfterAll
12- public static void afterAll () {
11+ @ AfterEach
12+ public void afterEach () {
1313 DAO4JSONFactory .clear ();
1414 }
1515
1616 @ Test
1717 public void testFindNodes () {
18- assertEquals (0 ,NodeFactory .getNames ().length );
18+ assertEquals (0 ,DAO4JSONFactory .getNames ().length );
1919 ServiceLoader <DAORegistry > loader = ServiceLoader .load (DAORegistry .class );
20- int count =0 ;
2120 for (DAORegistry registry : loader ) {
2221 registry .registerDAO ();
23- ++count ;
2422 }
25- assertEquals (1 ,count );
23+ assert (DAO4JSONFactory .size ()>0 );
24+ }
25+
26+ @ Test
27+ public void testFindNodes2 () {
28+ assertEquals (0 ,DAO4JSONFactory .getNames ().length );
29+ DAO4JSONFactory .registerAllDAOInPackage ("com.marginallyclever.nodegraphcore.json" );
30+ assert (DAO4JSONFactory .size ()>0 );
2631 }
2732}
Original file line number Diff line number Diff line change 22<!DOCTYPE configuration >
33<configuration >
44
5- <appender name =" STDOUT" class =" ch.qos.logback.core.ConsoleAppender" >
6- <!-- encoders are assigned the type
7- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
8- <encoder >
9- <pattern >%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern >
10- </encoder >
11- </appender >
5+ <if condition =' property("DEV").equals("true")' >
6+ <then >
7+ <appender name =" STDOUT" class =" ch.qos.logback.core.ConsoleAppender" >
8+ <encoder >
9+ <pattern >%d %boldCyan(%-5level) %boldGreen(%-15.-15logger{0}) - %msg %n</pattern >
10+ </encoder >
11+ </appender >
12+
13+ <root >
14+ <appender-ref ref =" STDOUT" />
15+ </root >
16+ </then >
17+ </if >
18+
19+ <logger name =" com.marginallyclever" level =" debug" />
1220
1321 <root level =" info" >
14- <appender-ref ref =" STDOUT " />
22+ <appender-ref ref =" FILE " />
1523 </root >
1624</configuration >
You can’t perform that action at this time.
0 commit comments