-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coverage updated. Log4j2 configuration added.
- Loading branch information
Showing
5 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Configuration status="WARN" monitorInterval="30"> | ||
<!-- Logging Properties --> | ||
<Properties> | ||
<Property name="APP_LOG_NAME">sample</Property> | ||
<Property name="LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS} %p %m%n</Property> | ||
<Property name="APP_LOG_ROOT">log</Property> | ||
</Properties> | ||
<Appenders> | ||
<Console name="Console" target="SYSTEM_OUT" follow="true"> | ||
<PatternLayout pattern="${LOG_PATTERN}"/> | ||
</Console> | ||
<RollingFile name="File" fileName="${APP_LOG_ROOT}/${APP_LOG_NAME}.log" filePattern="${APP_LOG_ROOT}/${APP_LOG_NAME}-%d{yyyy-MM-dd}-%i.log.gz"> | ||
<PatternLayout pattern="${LOG_PATTERN}"/> | ||
<Policies> | ||
<SizeBasedTriggeringPolicy size="2MB"/> | ||
</Policies> | ||
<DefaultRolloverStrategy max="10"/> | ||
</RollingFile> | ||
</Appenders> | ||
<Loggers> | ||
<Root level="TRACE"> | ||
<AppenderRef ref="Console"/> | ||
<AppenderRef ref="File"/> | ||
</Root> | ||
</Loggers> | ||
</Configuration> |
50 changes: 50 additions & 0 deletions
50
sample-pc/src/test/java/com/b3dgs/sample/pc/AppSampleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (C) 2013-2023 Byron 3D Games Studio (www.b3dgs.com) Pierre-Alexandre (contact@b3dgs.com) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
package com.b3dgs.sample.pc; | ||
|
||
import static com.b3dgs.lionengine.UtilAssert.assertPrivateConstructor; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import com.b3dgs.lionengine.Engine; | ||
import com.b3dgs.lionengine.UtilTests; | ||
|
||
/** | ||
* Test correct {@link AppSample} loading. | ||
*/ | ||
final class AppSampleTest | ||
{ | ||
/** | ||
* Test the constructor. | ||
*/ | ||
@Test | ||
void testConstructorPrivate() | ||
{ | ||
assertPrivateConstructor(AppSample.class); | ||
} | ||
|
||
/** | ||
* Test app. | ||
*/ | ||
@Test | ||
void testApp() | ||
{ | ||
AppSample.main(new String[] {}); | ||
UtilTests.pause(1000L); | ||
Engine.terminate(); | ||
} | ||
} |