Skip to content

WIP: Feature/issue 29#32

Open
bdelion wants to merge 12 commits intodevelopfrom
feature/issue-29
Open

WIP: Feature/issue 29#32
bdelion wants to merge 12 commits intodevelopfrom
feature/issue-29

Conversation

@bdelion
Copy link
Copy Markdown
Owner

@bdelion bdelion commented Oct 30, 2019

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 30, 2019

Codecov Report

Merging #32 into develop will increase coverage by 15.37%.
The diff coverage is 72.82%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ
...aining/java/basicweatherapp/owm/CoordLocation.java 100% <ø> (ø)
...ifiz/training/java/basicweatherapp/owm/Clouds.java 100% <ø> (ø)
...training/java/basicweatherapp/owm/SysInternal.java 84.21% <ø> (ø)
...va/basicweatherapp/BasicWeatherAppApplication.java 0% <0%> (ø)
...va/basicweatherapp/MessageTemplateReaderUtils.java 0% <0%> (ø)
...g/java/basicweatherapp/owm/TechnicalException.java 100% <100%> (ø)
...fiz/training/java/basicweatherapp/owm/Weather.java 100% <100%> (ø)
.../fifiz/training/java/basicweatherapp/owm/Wind.java 100% <100%> (ø)
.../fifiz/training/java/basicweatherapp/owm/Rain.java 100% <100%> (ø)
.../fifiz/training/java/basicweatherapp/owm/Snow.java 100% <100%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 775d13b...58f36e5. Read the comment docs.

Repository owner deleted a comment Oct 30, 2019
Repository owner deleted a comment Nov 3, 2019
Repository owner deleted a comment Nov 3, 2019
Repository owner deleted a comment Nov 4, 2019
Repository owner deleted a comment Feb 2, 2020
@bdelion
Copy link
Copy Markdown
Owner Author

bdelion commented Mar 3, 2020

Codacy Here is an overview of what got changed by this pull request:

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() {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//
private static final String OWN_RESULT_CITY_NOT_FOUND = "owm_citynotfound.json";

WireMockServer wireMockServer;
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

@Test
public void testMain() throws IOException {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WireMockServer wireMockServer;

@BeforeEach
public void setup() {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import java.nio.channels.ReadableByteChannel;
import java.util.Properties;

public class MavenWrapperDownloader {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import java.nio.channels.ReadableByteChannel;
import java.util.Properties;

public class MavenWrapperDownloader {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
@Test
public void contextLoads() {
assertTrue(true);
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant