Add Client, Server, Common

This commit is contained in:
cugurlu
2019-03-04 10:18:36 +01:00
parent 2453830be1
commit e09e8e2ef7
152 changed files with 3776 additions and 427 deletions

View File

@@ -1,35 +0,0 @@
package hello;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
@SpringBootApplication
public class Application {
private static final Logger log = LoggerFactory.getLogger(Application.class);
public static void main(String args[]) {
SpringApplication.run(Application.class);
}
@Bean
public RestTemplate restTemplate(RestTemplateBuilder builder) {
return builder.build();
}
@Bean
public CommandLineRunner run(RestTemplate restTemplate) throws Exception {
return args -> {
Message message = restTemplate.getForObject(
"http://localhost:8080/greeting?name=Ceren", Message.class);
log.info(message.toString());
};
}
}

View File

@@ -1,37 +0,0 @@
package hello;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown = true)
public class Message {
private static long id;
private static String content;
public Message() {
}
public static long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public static String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Override
public String toString() {
return "Message{" +
"id='" + id + '\'' +
", content=" + content +
'}';
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -18,7 +18,7 @@
<SUITE FILE_PATH="coverage/Client$Application.ic" NAME="Application Coverage Results" MODIFIED="1551095783813" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false">
<FILTER>hello.*</FILTER>
</SUITE>
<SUITE FILE_PATH="coverage/Client$MessageTest.ic" NAME="MessageTest Coverage Results" MODIFIED="1551105971731" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Client$MessageTest.ic" NAME="MessageTest Coverage Results" MODIFIED="1551109702772" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Client$ApplicationTest.ic" NAME="ApplicationTest Coverage Results" MODIFIED="1551106538746" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
</component>
<component name="CoverageViewManager">
@@ -65,57 +65,33 @@
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/hello/Application.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
<state relative-caret-position="442">
<caret line="26" column="74" lean-forward="true" selection-start-line="26" selection-start-column="74" selection-end-line="26" selection-end-column="74" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#645#646#0" expanded="true" />
<element signature="e#701#702#0" expanded="true" />
<element signature="e#780#781#0" expanded="true" />
<element signature="e#818#819#0" expanded="true" />
<element signature="e#590#591#0" expanded="true" />
<element signature="e#646#647#0" expanded="true" />
<element signature="e#725#726#0" expanded="true" />
<element signature="e#763#764#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/test/java/MessageTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="18" selection-start-line="2" selection-start-column="18" selection-end-line="2" selection-end-column="18" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/test/java/ApplicationTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="30" selection-start-line="2" selection-start-column="30" selection-end-line="2" selection-end-column="30" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="341">
<caret line="56" column="1" selection-start-line="56" selection-start-column="1" selection-end-line="56" selection-end-column="1" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/hello/Message.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="36" column="1" lean-forward="true" selection-start-line="36" selection-start-column="1" selection-end-line="36" selection-end-column="1" />
<folding>
<element signature="e#251#252#0" expanded="true" />
<element signature="e#276#277#0" expanded="true" />
<element signature="e#310#311#0" expanded="true" />
<element signature="e#338#339#0" expanded="true" />
</folding>
<state relative-caret-position="255">
<caret line="19" column="5" lean-forward="true" selection-start-line="19" selection-start-column="5" selection-end-line="19" selection-end-column="5" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="595">
<caret line="35" column="2" selection-start-line="35" selection-start-column="2" selection-end-line="35" selection-end-column="2" />
</state>
</provider>
</entry>
@@ -133,10 +109,10 @@
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/main/java/hello/MyApp.java" />
<option value="$PROJECT_DIR$/src/test/java/MessageTest.java" />
<option value="$PROJECT_DIR$/src/main/java/hello/Application.java" />
<option value="$PROJECT_DIR$/build.gradle" />
<option value="$PROJECT_DIR$/src/main/java/hello/Message.java" />
<option value="$PROJECT_DIR$/src/test/java/MessageTest.java" />
<option value="$PROJECT_DIR$/src/test/java/ApplicationTest.java" />
</list>
</option>
@@ -147,7 +123,7 @@
<select />
</treeState>
</component>
<component name="ProjectFrameBounds" extendedState="7">
<component name="ProjectFrameBounds">
<option name="x" value="-8" />
<option name="width" value="977" />
<option name="height" value="1038" />
@@ -156,67 +132,15 @@
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="Client" type="b2602c69:ProjectViewProjectNode" />
<item name="Client" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
</path>
<path>
<item name="Client" type="b2602c69:ProjectViewProjectNode" />
<item name="Client" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Client" type="b2602c69:ProjectViewProjectNode" />
<item name="Client" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
</path>
<path>
<item name="Client" type="b2602c69:ProjectViewProjectNode" />
<item name="Client" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Client" type="b2602c69:ProjectViewProjectNode" />
<item name="Client" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="hello" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Client" type="b2602c69:ProjectViewProjectNode" />
<item name="Client" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="test" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
</path>
<path>
<item name="Client" type="b2602c69:ProjectViewProjectNode" />
<item name="Client" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="test" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="PackagesPane" />
<pane id="Scope" />
</panes>
<panes />
</component>
<component name="PropertiesComponent">
<property name="Downloaded.Files.Path.Enabled" value="false" />
<property name="Repository.Attach.Annotations" value="false" />
<property name="Repository.Attach.JavaDocs" value="false" />
<property name="Repository.Attach.Sources" value="false" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1551107128931" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1551445524907" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" />
@@ -233,7 +157,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="JUnit.ApplicationTest">
<component name="RunManager" selected="JUnit.MessageTest">
<configuration name="Application" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="hello.Application" />
<module name="Client.main" />
@@ -299,8 +223,8 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="JUnit.ApplicationTest" />
<item itemvalue="JUnit.MessageTest" />
<item itemvalue="JUnit.ApplicationTest" />
<item itemvalue="Application.MyApp" />
<item itemvalue="Gradle.Client [build]" />
<item itemvalue="Application.Application" />
@@ -321,15 +245,6 @@
<servers />
</component>
<component name="TestHistory">
<history-entry file="MessageTest - 2019.02.25 at 15h 44m 31s.xml">
<configuration name="MessageTest" configurationId="JUnit" />
</history-entry>
<history-entry file="MessageTest - 2019.02.25 at 15h 45m 08s.xml">
<configuration name="MessageTest" configurationId="JUnit" />
</history-entry>
<history-entry file="MessageTest - 2019.02.25 at 15h 45m 29s.xml">
<configuration name="MessageTest" configurationId="JUnit" />
</history-entry>
<history-entry file="MessageTest - 2019.02.25 at 15h 45m 48s.xml">
<configuration name="MessageTest" configurationId="JUnit" />
</history-entry>
@@ -351,12 +266,21 @@
<history-entry file="ApplicationTest - 2019.02.25 at 15h 55m 39s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="ApplicationTest - 2019.02.25 at 16h 20m 13s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="ApplicationTest - 2019.02.25 at 16h 48m 20s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="MessageTest - 2019.02.25 at 16h 48m 25s.xml">
<configuration name="MessageTest" configurationId="JUnit" />
</history-entry>
</component>
<component name="ToolWindowManager">
<frame x="-7" y="-7" width="1550" height="838" extended-state="7" />
<frame x="-6" y="0" width="781" height="830" extended-state="0" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.111409396" />
<window_info content_ui="combo" id="Project" order="0" weight="0.41608876" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
@@ -365,17 +289,17 @@
<window_info id="Favorites" order="6" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.3286119" />
<window_info anchor="bottom" id="Run" order="2" weight="0.3286119" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.39943343" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Terminal" order="7" weight="0.3045326" />
<window_info anchor="bottom" id="Terminal" order="7" weight="0.38668555" />
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Build" order="10" weight="0.3295129" />
<window_info anchor="bottom" id="Build" order="10" weight="0.3286119" />
<window_info anchor="bottom" id="Messages" order="11" weight="0.3295129" />
<window_info active="true" anchor="right" id="Coverage" order="0" side_tool="true" visible="true" weight="0.3281879" />
<window_info anchor="right" id="Coverage" order="0" side_tool="true" visible="true" weight="0.19463088" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="1" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="2" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="3" weight="0.25" />
@@ -428,50 +352,47 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/hello/MyApp.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/hello/deletedApplication.txt" />
<entry file="file://$PROJECT_DIR$/build.gradle">
<entry file="file://$PROJECT_DIR$/src/test/java/ApplicationTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="341">
<caret line="56" column="1" selection-start-line="56" selection-start-column="1" selection-end-line="56" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/hello/Message.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="36" column="1" lean-forward="true" selection-start-line="36" selection-start-column="1" selection-end-line="36" selection-end-column="1" />
<folding>
<element signature="e#251#252#0" expanded="true" />
<element signature="e#276#277#0" expanded="true" />
<element signature="e#310#311#0" expanded="true" />
<element signature="e#338#339#0" expanded="true" />
</folding>
<state relative-caret-position="527">
<caret line="31" column="1" selection-start-line="31" selection-start-column="1" selection-end-line="31" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/MessageTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="18" selection-start-line="2" selection-start-column="18" selection-end-line="2" selection-end-column="18" />
<state>
<caret selection-end-line="2" selection-end-column="34" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/ApplicationTest.java">
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="30" selection-start-line="2" selection-start-column="30" selection-end-line="2" selection-end-column="30" />
<state relative-caret-position="595">
<caret line="35" column="2" selection-start-line="35" selection-start-column="2" selection-end-line="35" selection-end-column="2" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/hello/Message.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="19" column="5" lean-forward="true" selection-start-line="19" selection-start-column="5" selection-end-line="19" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/hello/Application.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
<state relative-caret-position="442">
<caret line="26" column="74" lean-forward="true" selection-start-line="26" selection-start-column="74" selection-end-line="26" selection-end-column="74" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#645#646#0" expanded="true" />
<element signature="e#701#702#0" expanded="true" />
<element signature="e#780#781#0" expanded="true" />
<element signature="e#818#819#0" expanded="true" />
<element signature="e#590#591#0" expanded="true" />
<element signature="e#646#647#0" expanded="true" />
<element signature="e#725#726#0" expanded="true" />
<element signature="e#763#764#0" expanded="true" />
</folding>
</state>
</provider>

View File

@@ -13,6 +13,28 @@ apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco'
//apply plugin: 'checkstyle'
//
//checkstyle {
// version = '7.8.1'
// config = 'checkstyle/checkstyle.xml' as File
//}
//
//checkstyleMain {
// source ='src/main/java'
//}
//
//checkstyleTest {
// source ='src/test/java'
//}
//
//tasks.withType(Checkstyle) {
// reports {
// xml.enabled false
// html.enabled true
// html.stylesheet resources.text.fromFile('config/xsl/checkstyle-custom.xsl')
// }
//}
sourceCompatibility = 1.8
targetCompatibility = 1.8
@@ -31,7 +53,11 @@ repositories {
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework:spring-web")
compile("com.fasterxml.jackson.core:jackson-databind")
testCompile("junit:junit")
compile project(':Common')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile(
'junit:junit:4.12',

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" />

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<AnchorPane fx:controller="gogreen.client.controller.UserController" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="574.0" prefWidth="934.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView fitHeight="574.0" fitWidth="943.0" layoutX="-1.0" pickOnBounds="true">
<image>
<Image url="@../pinkleaf.jpg" />
</image></ImageView>
<Text fill="#23773d" layoutX="283.0" layoutY="100.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Go Green" textAlignment="CENTER" wrappingWidth="374.936767578125">
<font>
<Font name="Californian FB" size="72.0" />
</font>
</Text>
<Button fx:id="loginButton" layoutX="419.0" layoutY="274.0" mnemonicParsing="false" prefHeight="26.0" prefWidth="96.0" text="Login" textAlignment="CENTER" onAction="#handleLoginButtonAction"/>
<Button fx:id="signupButton" layoutX="49.0" layoutY="52.0" mnemonicParsing="false" prefHeight="6.0" prefWidth="61.0" text="Sign UP"/>
<PasswordField fx:id="passwordField" layoutX="318.0" layoutY="210.0" prefHeight="42.0" prefWidth="303.0" promptText="Password" />
<Hyperlink layoutX="392.0" layoutY="308.0" prefHeight="42.0" prefWidth="173.0" text="Forgot Password?" textAlignment="CENTER" textFill="WHITE" textOverrun="LEADING_WORD_ELLIPSIS">
<font>
<Font name="Bodoni MT Bold" size="18.0" />
</font>
</Hyperlink>
<Text fill="#23773d" layoutX="7.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Not Member?" textAlignment="CENTER" wrappingWidth="146.13673400878906">
<font>
<Font name="Californian FB" size="14.0" />
</font>
</Text>
<TextField fx:id="usernameField" layoutX="319.0" layoutY="154.0" prefHeight="42.0" prefWidth="303.0" promptText="Username" />
</children>
</AnchorPane>

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

View File

@@ -0,0 +1,67 @@
package gogreen.client;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
@SpringBootApplication
public class Application extends javafx.application.Application {
private ConfigurableApplicationContext springContext;
private Parent rootNode;
private FXMLLoader fxmlLoader;
private static final Logger log = LoggerFactory.getLogger(Application.class);
public static void main(String[] args) {
launch(args);
}
// @Bean
// public RestTemplate restTemplate(RestTemplateBuilder builder) {
// return builder.build();
// }
@Override
public void init() throws Exception {
springContext = SpringApplication.run(Application.class);
fxmlLoader = new FXMLLoader();
fxmlLoader.setControllerFactory(springContext::getBean);
}
@Override
public void start(Stage primaryStage) throws Exception{
fxmlLoader.setLocation(this.getClass().getClassLoader().getResource("fxml/sample.fxml"));
rootNode = fxmlLoader.load();
// rootNode = FXMLLoader.load(this.getClass().getClassLoader().getResource("fxml/sample.fxml"));
primaryStage.setTitle("GoGreen");
Scene scene = new Scene(rootNode);
primaryStage.setScene(scene);
primaryStage.show();
}
@Override
public void stop() {
springContext.stop();
}
// @Bean
// public CommandLineRunner run(RestTemplate restTemplate) throws Exception {
// return args -> {
// User user = restTemplate.getForObject(
// "http://localhost:8080/user", User.class);
// log.info(user.toString());
//
// };
// }
}

View File

@@ -0,0 +1,89 @@
package gogreen.client.controller;
import gogreen.client.rest.UserService;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
import javafx.stage.Window;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.io.IOException;
@Controller
public class UserController {
@Autowired
UserService userService;
@FXML
private TextField usernameField;
@FXML
private PasswordField passwordField;
@FXML
private Button loginButton;
@FXML
private Button signupButton;
// @Value("${my.url}")
// private String myUrl;
// @FXML
// private void initialize(ActionEvent event) throws IOException {
// Parent parent = FXMLLoader.load(getClass().getResource("sample.fxml"));
// Scene scene = new Scene(parent);
// Stage app_stage = (Stage)((Node) event.getSource()).getScene().getWindow();
// app_stage.setScene(scene);
// app_stage.show();
// }
@FXML
protected void handleLoginButtonAction(ActionEvent event) throws IOException {
Window owner = loginButton.getScene().getWindow();
if(usernameField.getText().isEmpty()) {
AlertHelper.showAlert(Alert.AlertType.ERROR, owner, "Log-in Error!",
"Please enter your username");
return;
} else {
// newUser.setUsername(usernameField.getText());
System.out.println("Username is " + usernameField.getText());
}
if(passwordField.getText().isEmpty()) {
AlertHelper.showAlert(Alert.AlertType.ERROR, owner, "Log-in Error!",
"Please enter a password");
return;
} else {
// newUser.setPassword(passwordField.getText());
System.out.println("Password is " + passwordField.getText());
}
userService.registerUser(usernameField.getText(), passwordField.getText());
// Parent parent = FXMLLoader.load(this.getClass().getClassLoader().getResource("/fxml/dashboard.fxml"));
// Scene scene = new Scene(parent);
// Stage app_stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
// app_stage.setScene(scene);
// app_stage.show();
}
public static class AlertHelper {
public static void showAlert(Alert.AlertType alertType, Window owner, String title, String message) {
Alert alert = new Alert(alertType);
alert.setTitle(title);
alert.setHeaderText(null);
alert.setContentText(message);
alert.initOwner(owner);
alert.show();
}
}
}

View File

@@ -0,0 +1,33 @@
package gogreen.client.rest;
import gogreen.common.UserDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
@Component
public class UserService {
@Autowired
RestTemplate restTemplate;
@Bean
public RestTemplate restTemplate(RestTemplateBuilder builder) {
return builder.build();
}
public UserDTO registerUser(String name, String password) {
HttpHeaders headers = new HttpHeaders();
headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/registerUser")
.queryParam("name", name)
.queryParam("password", password);
HttpEntity<?> entity = new HttpEntity<>(headers);
return this.restTemplate.getForObject(builder.build().encode().toUri(), UserDTO.class);
}
}

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" />

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<AnchorPane fx:controller="gogreen.client.controller.UserController" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="574.0" prefWidth="934.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView fitHeight="574.0" fitWidth="943.0" layoutX="-1.0" pickOnBounds="true">
<image>
<Image url="@../pinkleaf.jpg" />
</image></ImageView>
<Text fill="#23773d" layoutX="283.0" layoutY="100.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Go Green" textAlignment="CENTER" wrappingWidth="374.936767578125">
<font>
<Font name="Californian FB" size="72.0" />
</font>
</Text>
<Button fx:id="loginButton" layoutX="419.0" layoutY="274.0" mnemonicParsing="false" prefHeight="26.0" prefWidth="96.0" text="Login" textAlignment="CENTER" onAction="#handleLoginButtonAction"/>
<Button fx:id="signupButton" layoutX="49.0" layoutY="52.0" mnemonicParsing="false" prefHeight="6.0" prefWidth="61.0" text="Sign UP"/>
<PasswordField fx:id="passwordField" layoutX="318.0" layoutY="210.0" prefHeight="42.0" prefWidth="303.0" promptText="Password" />
<Hyperlink layoutX="392.0" layoutY="308.0" prefHeight="42.0" prefWidth="173.0" text="Forgot Password?" textAlignment="CENTER" textFill="WHITE" textOverrun="LEADING_WORD_ELLIPSIS">
<font>
<Font name="Bodoni MT Bold" size="18.0" />
</font>
</Hyperlink>
<Text fill="#23773d" layoutX="7.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Not Member?" textAlignment="CENTER" wrappingWidth="146.13673400878906">
<font>
<Font name="Californian FB" size="14.0" />
</font>
</Text>
<TextField fx:id="usernameField" layoutX="319.0" layoutY="154.0" prefHeight="42.0" prefWidth="303.0" promptText="Username" />
</children>
</AnchorPane>

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

55
OOPP/Common/build.gradle Normal file
View File

@@ -0,0 +1,55 @@
buildscript {
repositories {
mavenCentral()
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
//apply plugin: 'checkstyle'
//
//checkstyle {
// version = '7.8.1'
// config = 'checkstyle/checkstyle.xml' as File
//}
//
//checkstyleMain {
// source ='src/main/java'
//}
//
//checkstyleTest {
// source ='src/test/java'
//}
//
//tasks.withType(Checkstyle) {
// reports {
// xml.enabled false
// html.enabled true
// html.stylesheet resources.text.fromFile('config/xsl/checkstyle-custom.xsl')
// }
//}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
}
jacoco {
toolVersion = "0.8.2"
reportsDir = file("$buildDir/customJacocoReportDir")
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}

View File

@@ -0,0 +1,7 @@
package gogreen.common;
public class ApplicationException extends RuntimeException {
public ApplicationException(String message) {
super(message);
}
}

View File

@@ -0,0 +1,17 @@
package gogreen.common;
public class ErrorResponse {
String message;
public ErrorResponse(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}

View File

@@ -0,0 +1,23 @@
package gogreen.common;
public class UserDTO {
private Long id;
private String name;
public UserDTO() {
}
public UserDTO(Long id, String name) {
this.id = id;
this.name = name;
}
public String getName() {
return name;
}
public Long getId() {
return id;
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

View File

@@ -0,0 +1,2 @@
#Wed Feb 20 23:42:38 CET 2019
gradle.version=5.2.1

View File

4
OOPP/Server/.idea/encodings.xml generated Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

20
OOPP/Server/.idea/gradle.xml generated Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$USER_HOME$/scoop/apps/gradle/current" />
<option name="gradleJvm" value="#JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
<option name="useAutoImport" value="true" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>

7
OOPP/Server/.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -15,15 +15,15 @@
<SUITE FILE_PATH="coverage/Server$GreetingTest.ic" NAME="GreetingTest Coverage Results" MODIFIED="1551100209640" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false">
<FILTER>hello.*</FILTER>
</SUITE>
<SUITE FILE_PATH="coverage/Server$All_in_Server_test.ic" NAME="All in Server.test Coverage Results" MODIFIED="1551103309935" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$All_in_Server_test.ic" NAME="All in Server.test Coverage Results" MODIFIED="1551111756573" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$All_in_Server__1_.ic" NAME="All in Server (1) Coverage Results" MODIFIED="1551103291954" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$MyClassTest.ic" NAME="MyClassTest Coverage Results" MODIFIED="1551089468794" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false">
<FILTER>hello.*</FILTER>
</SUITE>
<SUITE FILE_PATH="coverage/Server$GreetingControllerTest.ic" NAME="GreetingControllerTest Coverage Results" MODIFIED="1551104392951" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$GreetingTest__1_.ic" NAME="GreetingTest (1) Coverage Results" MODIFIED="1551103770292" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$GreetingControllerTest.ic" NAME="GreetingControllerTest Coverage Results" MODIFIED="1551109825841" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$GreetingTest__1_.ic" NAME="GreetingTest (1) Coverage Results" MODIFIED="1551109817421" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$GreetingTest_contexLoads.ic" NAME="GreetingTest.contexLoads Coverage Results" MODIFIED="1551101187799" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$ApplicationTest.ic" NAME="ApplicationTest Coverage Results" MODIFIED="1551106165264" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$ApplicationTest.ic" NAME="ApplicationTest Coverage Results" MODIFIED="1551111745372" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$All_in_Server.ic" NAME="All in Server Coverage Results" MODIFIED="1551103268350" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
<SUITE FILE_PATH="coverage/Server$Application.ic" NAME="Application Coverage Results" MODIFIED="1551106063871" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false">
<FILTER>hello.*</FILTER>
@@ -31,7 +31,7 @@
</component>
<component name="CoverageViewManager">
<option name="myAutoScrollToSource" value="true" />
<option name="myElementSize" value="498" />
<option name="myElementSize" value="112" />
</component>
<component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$">
@@ -62,85 +62,7 @@
<favorites_list name="Server" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/hello/Application.java">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret selection-end-line="11" selection-end-column="1" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#231#232#0" expanded="true" />
<element signature="e#293#294#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/test/java/ApplicationTest.java">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="1" selection-start-column="1" selection-end-line="5" selection-end-column="1" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/test/java/GreetingTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="238">
<caret line="14" column="1" lean-forward="true" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="303">
<caret line="59" lean-forward="true" selection-start-line="59" selection-end-line="59" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/test/java/GreetingControllerTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="238">
<caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/hello/Greeting.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="15" selection-start-line="12" selection-start-column="15" selection-end-line="12" selection-end-column="15" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/hello/GreetingController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="18" column="1" lean-forward="true" selection-start-line="18" selection-start-column="1" selection-end-line="18" selection-end-column="1" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
<leaf />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
@@ -159,19 +81,19 @@
<option value="$PROJECT_DIR$/config/checkstyle/checkstyle.xml" />
<option value="$PROJECT_DIR$/src/main/java/hello/JUnit5ExampleTest.java" />
<option value="$PROJECT_DIR$/src/main/java/hello/ApplicationTest.java" />
<option value="$PROJECT_DIR$/build.gradle" />
<option value="$PROJECT_DIR$/src/main/java/hello/Greeting.java" />
<option value="$PROJECT_DIR$/src/test/java/GreetingTest.java" />
<option value="$PROJECT_DIR$/src/test/java/GreetingControllerTest.java" />
<option value="$PROJECT_DIR$/src/main/java/hello/Application.java" />
<option value="$PROJECT_DIR$/src/test/java/ApplicationTest.java" />
<option value="$PROJECT_DIR$/build.gradle" />
<option value="$PROJECT_DIR$/src/main/java/hello/Greeting.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="7">
<option name="x" value="-8" />
<option name="width" value="977" />
<option name="height" value="1038" />
<component name="ProjectFrameBounds">
<option name="x" value="951" />
<option name="width" value="978" />
<option name="height" value="1039" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
@@ -190,40 +112,6 @@
<item name="Server" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Server" type="b2602c69:ProjectViewProjectNode" />
<item name="Server" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
</path>
<path>
<item name="Server" type="b2602c69:ProjectViewProjectNode" />
<item name="Server" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Server" type="b2602c69:ProjectViewProjectNode" />
<item name="Server" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="hello" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Server" type="b2602c69:ProjectViewProjectNode" />
<item name="Server" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="test" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
</path>
<path>
<item name="Server" type="b2602c69:ProjectViewProjectNode" />
<item name="Server" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="test" type="8a07ba80:GradleTreeStructureProvider$GradleModuleDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
@@ -237,11 +125,12 @@
<property name="Repository.Attach.Annotations" value="false" />
<property name="Repository.Attach.JavaDocs" value="false" />
<property name="Repository.Attach.Sources" value="false" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1551107153713" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1551357698420" />
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit5" />
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.Groovy JUnit" value="groovy.util.GroovyTestCase" />
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit5" value="" />
<property name="create.test.in.the.same.root" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../GoGreen/Server" />
</component>
<component name="RecentsManager">
<key name="CreateTestDialog.RecentsKey">
@@ -264,16 +153,11 @@
</list>
</option>
</component>
<component name="RunManager" selected="JUnit.ApplicationTest">
<configuration name="Application" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="hello.Application" />
<module name="Server.main" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="hello.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<component name="RunManager" selected="JUnit.All in Server.test">
<configuration name="All in Server.test" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="Server.test" />
<option name="PACKAGE_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<method v="2">
<option name="Make" enabled="true" />
</method>
@@ -322,11 +206,11 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="JUnit.All in Server.test" />
<item itemvalue="JUnit.ApplicationTest" />
<item itemvalue="JUnit.Application" />
<item itemvalue="JUnit.GreetingControllerTest" />
<item itemvalue="Application.Application" />
<item itemvalue="JUnit.GreetingTest (1)" />
<item itemvalue="JUnit.Application" />
</list>
</recent_temporary>
</component>
@@ -349,35 +233,35 @@
<servers />
</component>
<component name="TestHistory">
<history-entry file="GreetingControllerTest - 2019.02.25 at 15h 10m 29s.xml">
<history-entry file="ApplicationTest - 2019.02.25 at 16h 48m 44s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="ApplicationTest - 2019.02.25 at 16h 50m 09s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="GreetingTest_(1) - 2019.02.25 at 16h 50m 19s.xml">
<configuration name="GreetingTest (1)" configurationId="JUnit" />
</history-entry>
<history-entry file="GreetingControllerTest - 2019.02.25 at 16h 50m 27s.xml">
<configuration name="GreetingControllerTest" configurationId="JUnit" />
</history-entry>
<history-entry file="GreetingControllerTest - 2019.02.25 at 15h 19m 54s.xml">
<configuration name="GreetingControllerTest" configurationId="JUnit" />
</history-entry>
<history-entry file="ApplicationTest - 2019.02.25 at 15h 20m 23s.xml">
<history-entry file="ApplicationTest - 2019.02.25 at 16h 50m 36s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="ApplicationTest - 2019.02.25 at 15h 21m 37s.xml">
<history-entry file="ApplicationTest - 2019.02.25 at 16h 50m 48s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="ApplicationTest - 2019.02.25 at 15h 22m 16s.xml">
<history-entry file="ApplicationTest - 2019.02.25 at 17h 07m 04s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="ApplicationTest - 2019.02.25 at 15h 26m 38s.xml">
<history-entry file="ApplicationTest - 2019.02.25 at 17h 08m 24s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="ApplicationTest - 2019.02.25 at 15h 27m 29s.xml">
<history-entry file="ApplicationTest - 2019.02.25 at 17h 22m 26s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="Application - 2019.02.25 at 15h 47m 44s.xml">
<configuration name="Application" configurationId="JUnit" />
</history-entry>
<history-entry file="ApplicationTest - 2019.02.25 at 15h 48m 20s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
</history-entry>
<history-entry file="ApplicationTest - 2019.02.25 at 15h 49m 26s.xml">
<configuration name="ApplicationTest" configurationId="JUnit" />
<history-entry file="All_in_Server_test - 2019.02.25 at 17h 22m 39s.xml">
<configuration name="All in Server.test" configurationId="JUnit" />
</history-entry>
</component>
<component name="TodoView">
@@ -390,10 +274,10 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="-7" y="-7" width="1550" height="838" extended-state="7" />
<frame x="761" y="0" width="782" height="831" extended-state="0" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" sideWeight="0.4989733" visible="true" weight="0.17315437" />
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.4989733" visible="true" weight="0.22160664" />
<window_info id="Structure" order="1" sideWeight="0.5010267" side_tool="true" weight="0.445215" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
@@ -421,7 +305,7 @@
<window_info anchor="right" id="Theme Preview" order="6" />
<window_info anchor="right" id="Capture Analysis" order="7" />
<window_info anchor="right" id="Palette&#9;" order="8" />
<window_info active="true" anchor="right" id="Coverage" order="9" side_tool="true" visible="true" weight="0.50939596" />
<window_info anchor="right" id="Coverage" order="9" side_tool="true" visible="true" weight="0.2033557" />
</layout>
<layout-to-restore>
<window_info content_ui="combo" id="Project" order="0" sideWeight="0.4989733" weight="0.17803468" />
@@ -476,6 +360,33 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/GreetingControllerTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="9" column="65" selection-start-line="9" selection-start-column="65" selection-end-line="9" selection-end-column="65" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/ApplicationTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="1" selection-start-line="5" selection-start-column="1" selection-end-line="5" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/GreetingTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="13" column="5" selection-start-line="13" selection-start-column="5" selection-end-line="13" selection-end-column="5" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/hello/GreetingController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
@@ -486,44 +397,17 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/GreetingControllerTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="238">
<caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="303">
<caret line="59" lean-forward="true" selection-start-line="59" selection-end-line="59" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/hello/Greeting.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="15" selection-start-line="12" selection-start-column="15" selection-end-line="12" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/GreetingTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="238">
<caret line="14" column="1" lean-forward="true" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
<folding>
<element signature="imports" expanded="true" />
</folding>
<state relative-caret-position="255">
<caret line="19" column="1" lean-forward="true" selection-start-line="19" selection-start-column="1" selection-end-line="19" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/hello/Application.java">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret selection-end-line="11" selection-end-column="1" />
<caret column="14" selection-start-column="14" selection-end-column="14" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#231#232#0" expanded="true" />
@@ -532,10 +416,10 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/ApplicationTest.java">
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="1" selection-start-column="1" selection-end-line="5" selection-end-column="1" />
<state relative-caret-position="71">
<caret line="16" column="9" lean-forward="true" selection-start-line="16" selection-start-column="9" selection-end-line="16" selection-end-column="9" />
</state>
</provider>
</entry>

View File

@@ -13,6 +13,28 @@ apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
//checkstyle {
// version = '7.8.1'
// config = 'checkstyle/checkstyle.xml' as File
//}
//
//checkstyleMain {
// source ='src/main/java'
//}
//
//checkstyleTest {
// source ='src/test/java'
//}
//
//tasks.withType(Checkstyle) {
// reports {
// xml.enabled false
// html.enabled true
// html.stylesheet resources.text.fromFile('config/xsl/checkstyle-custom.xsl')
// }
//}
bootJar {
baseName = 'gs-rest-service'
@@ -23,6 +45,7 @@ test {
useJUnitPlatform()
}
repositories {
mavenCentral()
}
@@ -33,6 +56,11 @@ targetCompatibility = 1.8
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
testCompile('org.springframework.boot:spring-boot-starter-test')
compile project(':Common')
compileOnly 'org.projectlombok:lombok:1.18.6'
annotationProcessor 'org.projectlombok:lombok:1.18.6'
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("com.h2database:h2")
testCompile(
'junit:junit:4.12',
'org.junit.jupiter:junit-jupiter-api:5.4.0'

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>User.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <a href="index.source.html" class="el_package">gogreen.server.data.model</a> &gt; <span class="el_source">User.java</span></div><h1>User.java</h1><pre class="source lang-java linenums">package gogreen.server.data.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
<span class="nc bnc" id="L12" title="All 30 branches missed.">@Data</span>
<span class="fc" id="L13">@AllArgsConstructor</span>
<span class="fc" id="L14">@NoArgsConstructor</span>
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
<span class="fc" id="L19"> Long id;</span>
<span class="fc" id="L20"> String name;</span>
<span class="nc" id="L21"> String password;</span>
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>gogreen.server.data.model</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <span class="el_package">gogreen.server.data.model</span></div><h1>gogreen.server.data.model</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">160 of 181</td><td class="ctr2">11%</td><td class="bar">30 of 30</td><td class="ctr2">0%</td><td class="ctr1">23</td><td class="ctr2">27</td><td class="ctr1">2</td><td class="ctr2">6</td><td class="ctr1">8</td><td class="ctr2">12</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="User.html" class="el_class">User</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="106" height="10" title="160" alt="160"/><img src="../jacoco-resources/greenbar.gif" width="13" height="10" title="21" alt="21"/></td><td class="ctr2" id="c0">11%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="30" alt="30"/></td><td class="ctr2" id="e0">0%</td><td class="ctr1" id="f0">23</td><td class="ctr2" id="g0">27</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">6</td><td class="ctr1" id="j0">8</td><td class="ctr2" id="k0">12</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>gogreen.server.data.model</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <span class="el_package">gogreen.server.data.model</span></div><h1>gogreen.server.data.model</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">160 of 181</td><td class="ctr2">11%</td><td class="bar">30 of 30</td><td class="ctr2">0%</td><td class="ctr1">23</td><td class="ctr2">27</td><td class="ctr1">2</td><td class="ctr2">6</td><td class="ctr1">8</td><td class="ctr2">12</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="User.java.html" class="el_source">User.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="106" height="10" title="160" alt="160"/><img src="../jacoco-resources/greenbar.gif" width="13" height="10" title="21" alt="21"/></td><td class="ctr2" id="c0">11%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="30" alt="30"/></td><td class="ctr2" id="e0">0%</td><td class="ctr1" id="f0">23</td><td class="ctr2" id="g0">27</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">6</td><td class="ctr1" id="j0">8</td><td class="ctr2" id="k0">12</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>RestExceptionHandler</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <a href="index.html" class="el_package">gogreen.server.rest</a> &gt; <span class="el_class">RestExceptionHandler</span></div><h1>RestExceptionHandler</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 9</td><td class="ctr2">100%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">0</td><td class="ctr2">2</td><td class="ctr1">0</td><td class="ctr2">2</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a0"><a href="RestExceptionHandler.java.html#L16" class="el_method">applicationException(ApplicationException)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="6" alt="6"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">1</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="RestExceptionHandler.java.html#L11" class="el_method">RestExceptionHandler()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="3" alt="3"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>RestExceptionHandler.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <a href="index.source.html" class="el_package">gogreen.server.rest</a> &gt; <span class="el_source">RestExceptionHandler.java</span></div><h1>RestExceptionHandler.java</h1><pre class="source lang-java linenums">package gogreen.server.rest;
import gogreen.common.ApplicationException;
import gogreen.common.ErrorResponse;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@RestControllerAdvice
<span class="fc" id="L11">public class RestExceptionHandler {</span>
@ExceptionHandler(ApplicationException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
public ErrorResponse applicationException (ApplicationException ex) {
<span class="fc" id="L16"> return new ErrorResponse(ex.getMessage());</span>
}
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>UserController</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <a href="index.html" class="el_package">gogreen.server.rest</a> &gt; <span class="el_class">UserController</span></div><h1>UserController</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">6 of 15</td><td class="ctr2">60%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">1</td><td class="ctr2">3</td><td class="ctr1">1</td><td class="ctr2">3</td><td class="ctr1">1</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a0"><a href="UserController.java.html#L24" class="el_method">login(String, String)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="6" alt="6"/></td><td class="ctr2" id="c2">0%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">1</td><td class="ctr2" id="i0">1</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="UserController.java.html#L18" class="el_method">registerUser(String, String)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="6" alt="6"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="UserController.java.html#L11" class="el_method">UserController()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="3" alt="3"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">1</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>UserController.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <a href="index.source.html" class="el_package">gogreen.server.rest</a> &gt; <span class="el_source">UserController.java</span></div><h1>UserController.java</h1><pre class="source lang-java linenums">package gogreen.server.rest;
import gogreen.common.UserDTO;
import gogreen.server.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
<span class="fc" id="L11">public class UserController {</span>
@Autowired
UserService userService;
@RequestMapping(&quot;/registerUser&quot;)
public UserDTO registerUser(@RequestParam(value=&quot;name&quot;) String name,
@RequestParam(value=&quot;password&quot;) String password) {
<span class="fc" id="L18"> return userService.registerUser(name, password);</span>
}
@RequestMapping(&quot;/login&quot;)
public UserDTO login(@RequestParam(value=&quot;name&quot;) String name,
@RequestParam(value=&quot;password&quot;) String password) {
<span class="nc" id="L24"> return userService.login(name, password);</span>
}
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>gogreen.server.rest</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <span class="el_package">gogreen.server.rest</span></div><h1>gogreen.server.rest</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">6 of 24</td><td class="ctr2">75%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">1</td><td class="ctr2">5</td><td class="ctr1">1</td><td class="ctr2">5</td><td class="ctr1">1</td><td class="ctr2">5</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a1"><a href="UserController.html" class="el_class">UserController</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="48" height="10" title="6" alt="6"/><img src="../jacoco-resources/greenbar.gif" width="72" height="10" title="9" alt="9"/></td><td class="ctr2" id="c1">60%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">3</td><td class="ctr1" id="h0">1</td><td class="ctr2" id="i0">3</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">3</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a0"><a href="RestExceptionHandler.html" class="el_class">RestExceptionHandler</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="72" height="10" title="9" alt="9"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">2</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">2</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">2</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>gogreen.server.rest</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <span class="el_package">gogreen.server.rest</span></div><h1>gogreen.server.rest</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">6 of 24</td><td class="ctr2">75%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">1</td><td class="ctr2">5</td><td class="ctr1">1</td><td class="ctr2">5</td><td class="ctr1">1</td><td class="ctr2">5</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a1"><a href="UserController.java.html" class="el_source">UserController.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="48" height="10" title="6" alt="6"/><img src="../jacoco-resources/greenbar.gif" width="72" height="10" title="9" alt="9"/></td><td class="ctr2" id="c1">60%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">3</td><td class="ctr1" id="h0">1</td><td class="ctr2" id="i0">3</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">3</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a0"><a href="RestExceptionHandler.java.html" class="el_source">RestExceptionHandler.java</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="72" height="10" title="9" alt="9"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">2</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">2</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">2</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>UserService</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <a href="index.html" class="el_package">gogreen.server.service</a> &gt; <span class="el_class">UserService</span></div><h1>UserService</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">30 of 84</td><td class="ctr2">64%</td><td class="bar">4 of 6</td><td class="ctr2">33%</td><td class="ctr1">3</td><td class="ctr2">6</td><td class="ctr1">6</td><td class="ctr2">14</td><td class="ctr1">1</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a0"><a href="UserService.java.html#L30" class="el_method">login(String, String)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="76" height="10" title="30" alt="30"/></td><td class="ctr2" id="c2">0%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="4" alt="4"/></td><td class="ctr2" id="e1">0%</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g0">3</td><td class="ctr1" id="h0">6</td><td class="ctr2" id="i0">6</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="UserService.java.html#L19" class="el_method">registerUser(String, String)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="47" alt="47"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">2</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">6</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="UserService.java.html#L13" class="el_method">UserService()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="17" height="10" title="7" alt="7"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>UserService.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <a href="index.source.html" class="el_package">gogreen.server.service</a> &gt; <span class="el_source">UserService.java</span></div><h1>UserService.java</h1><pre class="source lang-java linenums">package gogreen.server.service;
import gogreen.common.ApplicationException;
import gogreen.common.UserDTO;
import gogreen.server.data.model.User;
import gogreen.server.data.repository.UserRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
<span class="fc" id="L13">public class UserService {</span>
<span class="fc" id="L14"> Logger logger = LoggerFactory.getLogger(UserService.class);</span>
@Autowired
UserRepository userRepository;
public UserDTO registerUser(String name, String password) {
<span class="fc" id="L19"> User user = userRepository.findByName(name);</span>
<span class="fc bfc" id="L20" title="All 2 branches covered."> if (user != null) {</span>
<span class="fc" id="L21"> throw new ApplicationException(&quot;User already exists&quot;);</span>
} else {
<span class="fc" id="L23"> user = userRepository.save(new User(null, name, password));</span>
}
<span class="fc" id="L25"> logger.info(&quot;Created user id=&quot; + user.getId() + &quot;, name=&quot; + user.getName());</span>
<span class="fc" id="L26"> return new UserDTO(user.getId(), user.getName());</span>
}
public UserDTO login(String name, String password) {
<span class="nc" id="L30"> User user = userRepository.findByName(name);</span>
<span class="nc bnc" id="L31" title="All 2 branches missed."> if (user == null) {</span>
<span class="nc" id="L32"> throw new ApplicationException(&quot;User does not exist&quot;);</span>
} else {
<span class="nc bnc" id="L34" title="All 2 branches missed."> if (!user.getPassword().equals(password)) {</span>
<span class="nc" id="L35"> throw new ApplicationException(&quot;Wrong password&quot;);</span>
}
}
<span class="nc" id="L38"> return new UserDTO(user.getId(), user.getName());</span>
}
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>gogreen.server.service</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <span class="el_package">gogreen.server.service</span></div><h1>gogreen.server.service</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">30 of 84</td><td class="ctr2">64%</td><td class="bar">4 of 6</td><td class="ctr2">33%</td><td class="ctr1">3</td><td class="ctr2">6</td><td class="ctr1">6</td><td class="ctr2">14</td><td class="ctr1">1</td><td class="ctr2">3</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="UserService.html" class="el_class">UserService</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="42" height="10" title="30" alt="30"/><img src="../jacoco-resources/greenbar.gif" width="77" height="10" title="54" alt="54"/></td><td class="ctr2" id="c0">64%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="80" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="40" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">33%</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g0">6</td><td class="ctr1" id="h0">6</td><td class="ctr2" id="i0">14</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">3</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>gogreen.server.service</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <span class="el_package">gogreen.server.service</span></div><h1>gogreen.server.service</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">30 of 84</td><td class="ctr2">64%</td><td class="bar">4 of 6</td><td class="ctr2">33%</td><td class="ctr1">3</td><td class="ctr2">6</td><td class="ctr1">6</td><td class="ctr2">14</td><td class="ctr1">1</td><td class="ctr2">3</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="UserService.java.html" class="el_source">UserService.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="42" height="10" title="30" alt="30"/><img src="../jacoco-resources/greenbar.gif" width="77" height="10" title="54" alt="54"/></td><td class="ctr2" id="c0">64%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="80" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="40" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">33%</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g0">6</td><td class="ctr1" id="h0">6</td><td class="ctr2" id="i0">14</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">3</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>Application</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <a href="index.html" class="el_package">gogreen.server</a> &gt; <span class="el_class">Application</span></div><h1>Application</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">5 of 8</td><td class="ctr2">37%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">1</td><td class="ctr2">2</td><td class="ctr1">2</td><td class="ctr2">3</td><td class="ctr1">1</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a1"><a href="Application.java.html#L10" class="el_method">main(String[])</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="5" alt="5"/></td><td class="ctr2" id="c1">0%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">2</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a href="Application.java.html#L7" class="el_method">Application()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="72" height="10" title="3" alt="3"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>Application.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <a href="index.source.html" class="el_package">gogreen.server</a> &gt; <span class="el_source">Application.java</span></div><h1>Application.java</h1><pre class="source lang-java linenums">package gogreen.server;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
<span class="fc" id="L7">public class Application {</span>
public static void main(String[] args) {
<span class="nc" id="L10"> SpringApplication.run(Application.class, args);</span>
<span class="nc" id="L11"> }</span>
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>gogreen.server</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <span class="el_package">gogreen.server</span></div><h1>gogreen.server</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">5 of 8</td><td class="ctr2">37%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">1</td><td class="ctr2">2</td><td class="ctr1">2</td><td class="ctr2">3</td><td class="ctr1">1</td><td class="ctr2">2</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="Application.html" class="el_class">Application</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="75" height="10" title="5" alt="5"/><img src="../jacoco-resources/greenbar.gif" width="45" height="10" title="3" alt="3"/></td><td class="ctr2" id="c0">37%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">2</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">3</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">2</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>gogreen.server</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Server</a> &gt; <span class="el_package">gogreen.server</span></div><h1>gogreen.server</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">5 of 8</td><td class="ctr2">37%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">1</td><td class="ctr2">2</td><td class="ctr1">2</td><td class="ctr2">3</td><td class="ctr1">1</td><td class="ctr2">2</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="Application.java.html" class="el_source">Application.java</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="75" height="10" title="5" alt="5"/><img src="../jacoco-resources/greenbar.gif" width="45" height="10" title="3" alt="3"/></td><td class="ctr2" id="c0">37%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">2</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">3</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">2</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html>

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

View File

@@ -0,0 +1,13 @@
/* Pretty printing styles. Used with prettify.js. */
.str { color: #2A00FF; }
.kwd { color: #7F0055; font-weight:bold; }
.com { color: #3F5FBF; }
.typ { color: #606; }
.lit { color: #066; }
.pun { color: #660; }
.pln { color: #000; }
.tag { color: #008; }
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Some files were not shown because too many files have changed in this diff Show More