Conversation
Codecov Report
@@ Coverage Diff @@
## develop #32 +/- ##
============================================
+ Coverage 54.46% 69.83% +15.37%
============================================
Files 11 13 +2
Lines 213 242 +29
Branches 6 6
============================================
+ Hits 116 169 +53
+ Misses 96 72 -24
Partials 1 1
Continue to review full report at Codecov.
|
✨ Make work again
✅ Add json file for Rain and Snow Unit Tests
🚚 src-old sources
➕ org.apache.logging.log4j:log4j-slf4j-impl
🔊 Rework logs
86b016b to
767179c
Compare
|
Issues
======
- Added 20
Complexity increasing per file
==============================
- src/test/java/fr/fifiz/training/app/java/own/OwmClientTest.java 2
- src/test/java/fr/fifiz/training/app/java/own/TestException.java 1
- src/main/java/fr/fifiz/training/app/java/owm/Rain.java 1
- src/test/java/fr/fifiz/training/app/java/own/WeatherResultStub.java 4
- src/main/java/fr/fifiz/training/app/java/owm/TechnicalException.java 1
- src/test/java/fr/fifiz/training/app/java/own/WeatherResultTest.java 1
- .mvn/wrapper/MavenWrapperDownloader.java 8
- src/main/java/fr/fifiz/training/app/java/owm/Wind.java 1
- src/main/java/fr/fifiz/training/app/java/owm/Weather.java 1
- src/main/java/fr/fifiz/training/app/java/owm/CoordLocation.java 1
- src/main/java/fr/fifiz/training/app/java/owm/Clouds.java 1
- src/main/java/fr/fifiz/training/app/java/owm/WeatherResult.java 1
- src/main/java/fr/fifiz/training/app/java/MessageTemplateReaderUtils.java 5
- src/main/java/fr/fifiz/training/app/java/owm/OwmClient.java 10
- src/main/java/fr/fifiz/training/app/java/BasicWeatherAppApplication.java 3
- src/main/java/fr/fifiz/training/app/java/owm/Snow.java 1
- src/test/java/fr/fifiz/training/app/java/BasicWeatherAppApplicationTests.java 1
- src/main/java/fr/fifiz/training/app/java/owm/SysInternal.java 1
- src/main/java/fr/fifiz/training/app/java/owm/Main.java 1
Clones added
============
- src/test/java/fr/fifiz/training/app/java/own/OwmClientTest.java 2
See the complete overview on Codacy |
| } | ||
|
|
||
| @AfterEach | ||
| public void teardown() { |
There was a problem hiding this comment.
| // | ||
| private static final String OWN_RESULT_CITY_NOT_FOUND = "owm_citynotfound.json"; | ||
|
|
||
| WireMockServer wireMockServer; |
There was a problem hiding this comment.
| try { | ||
| downloadFileFromURL(url, outputFile); | ||
| System.out.println("Done"); | ||
| System.exit(0); |
There was a problem hiding this comment.
Issue found: System.exit() should not be used in J2EE/JEE apps
| OwmClient client = new OwmClient(new URL(LOCAL_URL_MALFORMED | ||
| .replace(LOCAL_URL_PORT, String.valueOf(wireMockServer.port())).replace(LOCAL_URL_PATH, WEATHER_API_PATH))); | ||
| try { | ||
| WeatherResult weatherResult = client.getWeather(); |
There was a problem hiding this comment.
|
|
||
| File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); | ||
| if(!outputFile.getParentFile().exists()) { | ||
| if(!outputFile.getParentFile().mkdirs()) { |
There was a problem hiding this comment.
Issue found: These nested if statements could be combined
| } | ||
|
|
||
| @Test | ||
| public void testMain() throws IOException { |
There was a problem hiding this comment.
Issue found: JUnit tests should include assert() or fail()
| WireMockServer wireMockServer; | ||
|
|
||
| @BeforeEach | ||
| public void setup() { |
There was a problem hiding this comment.
| import java.nio.channels.ReadableByteChannel; | ||
| import java.util.Properties; | ||
|
|
||
| public class MavenWrapperDownloader { |
There was a problem hiding this comment.
| import java.nio.channels.ReadableByteChannel; | ||
| import java.util.Properties; | ||
|
|
||
| public class MavenWrapperDownloader { |
There was a problem hiding this comment.
| } catch (Throwable e) { | ||
| System.out.println("- Error downloading"); | ||
| e.printStackTrace(); | ||
| System.exit(1); |
There was a problem hiding this comment.
Issue found: System.exit() should not be used in J2EE/JEE apps
| */ | ||
| @Test | ||
| public void contextLoads() { | ||
| assertTrue(true); |
There was a problem hiding this comment.
No description provided.