Merge branch 'checkstyle' into 'master'
Merge checkstyle branch into master See merge request cse1105/2018-2019/oopp-group-43/template!24
This commit is contained in:
@@ -1,188 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
||||
|
||||
<!--
|
||||
This configuration file was written by the eclipse-cs plugin configuration editor
|
||||
-->
|
||||
<!--
|
||||
Checkstyle-Configuration: TI1216
|
||||
Description:
|
||||
Checkstyle configurartion that checks the Google coding conventions (https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html).
|
||||
-->
|
||||
<module name="Checker">
|
||||
<property name="severity" value="warning"/>
|
||||
<property name="charset" value="UTF-8"/>
|
||||
<property name="fileExtensions" value="java, properties, xml"/>
|
||||
<module name="TreeWalker">
|
||||
<module name="OuterTypeFilename"/>
|
||||
<module name="IllegalTokenText">
|
||||
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
|
||||
<property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
|
||||
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
|
||||
</module>
|
||||
<module name="LineLength">
|
||||
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
|
||||
<property name="max" value="100"/>
|
||||
</module>
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="NoLineWrap"/>
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="TEXT"/>
|
||||
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||
</module>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="LeftCurly"/>
|
||||
<module name="RightCurly"/>
|
||||
<module name="RightCurly">
|
||||
<property name="option" value="alone"/>
|
||||
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
|
||||
</module>
|
||||
<module name="WhitespaceAround">
|
||||
<property name="allowEmptyConstructors" value="true"/>
|
||||
<property name="allowEmptyMethods" value="true"/>
|
||||
<property name="allowEmptyTypes" value="true"/>
|
||||
<property name="allowEmptyLoops" value="true"/>
|
||||
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
||||
<message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
|
||||
</module>
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<module name="FallThrough"/>
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="EmptyLineSeparator">
|
||||
<property name="allowNoEmptyLineBetweenFields" value="true"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="option" value="nl"/>
|
||||
<property name="tokens" value="DOT"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="option" value="EOL"/>
|
||||
<property name="tokens" value="COMMA"/>
|
||||
</module>
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||
<message key="name.invalidPattern" value="Package name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="TypeName">
|
||||
<message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MemberName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ParameterName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="LocalVariableName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<property name="allowOneCharVarInForLoop" value="true"/>
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<message key="name.invalidPattern" value="Local variable name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ClassTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern" value="Class type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MethodTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern" value="Method type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="InterfaceTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern" value="Interface type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="NoFinalizer"/>
|
||||
<module name="GenericWhitespace">
|
||||
<message key="ws.notPreceded" value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
||||
<message key="ws.followed" value="GenericWhitespace ''{0}'' is followed by whitespace."/>
|
||||
<message key="ws.preceded" value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
|
||||
<message key="ws.illegalFollow" value="GenericWhitespace ''{0}'' should followed by whitespace."/>
|
||||
</module>
|
||||
<module name="Indentation">
|
||||
<property name="basicOffset" value="4"/>
|
||||
<property name="caseIndent" value="4"/>
|
||||
<property name="arrayInitIndent" value="4"/>
|
||||
</module>
|
||||
<module name="AbbreviationAsWordInName">
|
||||
<property name="allowedAbbreviationLength" value="1"/>
|
||||
<property name="ignoreFinal" value="false"/>
|
||||
</module>
|
||||
<module name="OverloadMethodsDeclarationOrder"/>
|
||||
<module name="VariableDeclarationUsageDistance"/>
|
||||
<module name="CustomImportOrder">
|
||||
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
|
||||
<property name="specialImportsRegExp" value="com.google"/>
|
||||
<property name="sortImportsInGroupAlphabetically" value="true"/>
|
||||
</module>
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="OperatorWrap">
|
||||
<property name="option" value="NL"/>
|
||||
<property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="allowSamelineMultipleAnnotations" value="true"/>
|
||||
</module>
|
||||
<module name="NonEmptyAtclauseDescription"/>
|
||||
<module name="JavadocTagContinuationIndentation"/>
|
||||
<module name="SummaryJavadoc">
|
||||
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
|
||||
</module>
|
||||
<module name="JavadocParagraph"/>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||
</module>
|
||||
<module name="JavadocMethod">
|
||||
<property name="minLineCount" value="2"/>
|
||||
<property name="allowedAnnotations" value="Override, Test"/>
|
||||
<property name="scope" value="public"/>
|
||||
<property name="allowThrowsTagsForSubclasses" value="true"/>
|
||||
<property name="allowMissingParamTags" value="true"/>
|
||||
<property name="allowMissingThrowsTags" value="true"/>
|
||||
<property name="allowMissingReturnTag" value="true"/>
|
||||
</module>
|
||||
<module name="MethodName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
|
||||
<message key="name.invalidPattern" value="Method name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="SingleLineJavadoc">
|
||||
<property name="ignoreInlineTags" value="false"/>
|
||||
</module>
|
||||
<module name="EmptyCatchBlock">
|
||||
<property name="exceptionVariableName" value="expected"/>
|
||||
</module>
|
||||
<module name="CommentsIndentation"/>
|
||||
<module name="UnusedImports"/>
|
||||
<module name="RedundantImport"/>
|
||||
<module name="MethodLength"/>
|
||||
<module name="ParameterNumber"/>
|
||||
<module name="MethodCount">
|
||||
<property name="maxTotal" value="50"/>
|
||||
<property name="maxPrivate" value="50"/>
|
||||
<property name="maxPackage" value="50"/>
|
||||
<property name="maxProtected" value="50"/>
|
||||
<property name="maxPublic" value="50"/>
|
||||
</module>
|
||||
<module name="AvoidNestedBlocks"/>
|
||||
<module name="DeclarationOrder"/>
|
||||
<module name="EmptyStatement"/>
|
||||
<module name="IllegalThrows"/>
|
||||
<module name="IllegalCatch"/>
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<module name="StringLiteralEquality"/>
|
||||
<module name="UnnecessaryParentheses"/>
|
||||
<module name="CyclomaticComplexity"/>
|
||||
</module>
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="true"/>
|
||||
</module>
|
||||
<module name="FileLength"/>
|
||||
</module>
|
||||
48
build.gradle
48
build.gradle
@@ -16,44 +16,16 @@ apply plugin: 'eclipse'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'org.springframework.boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
apply plugin: 'jacoco'
|
||||
apply plugin: 'checkstyle'
|
||||
apply plugin: 'application'
|
||||
|
||||
application {
|
||||
mainClassName = 'greenify.server.Application'
|
||||
}
|
||||
|
||||
tasks.withType(Checkstyle) {
|
||||
reports {
|
||||
html.destination rootProject.file("build/reports/checkstyle.html")
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
allprojects {
|
||||
task hello {
|
||||
doLast { task ->
|
||||
println "I'm $task.project.name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////client bootjar
|
||||
//bootJar {
|
||||
// baseName = 'gs-consuming-rest'
|
||||
// version = '0.1.0'
|
||||
//}
|
||||
//
|
||||
////server bootjar
|
||||
//bootJar {
|
||||
// baseName = 'gs-rest-service'
|
||||
// version = '0.1.0'
|
||||
//}
|
||||
|
||||
bootJar {
|
||||
enabled = false
|
||||
}
|
||||
@@ -65,10 +37,6 @@ jar {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile("org.springframework.boot:spring-boot-starter")
|
||||
compile("org.springframework:spring-web")
|
||||
@@ -90,22 +58,6 @@ dependencies {
|
||||
)
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion = "0.8.3"
|
||||
reportsDir = file("$buildDir/customJacocoReportDir")
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
reports {
|
||||
xml.enabled false
|
||||
csv.enabled false
|
||||
html.destination file("${buildDir}/jacocoHtml")
|
||||
}
|
||||
}
|
||||
|
||||
task application(type: JavaExec, dependsOn: classes) {
|
||||
main = 'Cient.Application'
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
188
quality/checkstyle/checkstyle.xml
Normal file
188
quality/checkstyle/checkstyle.xml
Normal file
@@ -0,0 +1,188 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
||||
|
||||
<!--
|
||||
This configuration file was written by the eclipse-cs plugin configuration editor
|
||||
-->
|
||||
<!--
|
||||
Checkstyle-Configuration: TI1216
|
||||
Description:
|
||||
Checkstyle configurartion that checks the Google coding conventions (https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html).
|
||||
-->
|
||||
<module name="Checker">
|
||||
<property name="severity" value="warning"/>
|
||||
<property name="charset" value="UTF-8"/>
|
||||
<property name="fileExtensions" value="java, properties, xml"/>
|
||||
<module name="TreeWalker">
|
||||
<module name="OuterTypeFilename"/>
|
||||
<module name="IllegalTokenText">
|
||||
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
|
||||
<property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
|
||||
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
|
||||
</module>
|
||||
<module name="LineLength">
|
||||
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
|
||||
<property name="max" value="100"/>
|
||||
</module>
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="NoLineWrap"/>
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="TEXT"/>
|
||||
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||
</module>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="LeftCurly"/>
|
||||
<module name="RightCurly"/>
|
||||
<module name="RightCurly">
|
||||
<property name="option" value="alone"/>
|
||||
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
|
||||
</module>
|
||||
<module name="WhitespaceAround">
|
||||
<property name="allowEmptyConstructors" value="true"/>
|
||||
<property name="allowEmptyMethods" value="true"/>
|
||||
<property name="allowEmptyTypes" value="true"/>
|
||||
<property name="allowEmptyLoops" value="true"/>
|
||||
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
||||
<message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
|
||||
</module>
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<module name="FallThrough"/>
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="EmptyLineSeparator">
|
||||
<property name="allowNoEmptyLineBetweenFields" value="true"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="option" value="nl"/>
|
||||
<property name="tokens" value="DOT"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="option" value="EOL"/>
|
||||
<property name="tokens" value="COMMA"/>
|
||||
</module>
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||
<message key="name.invalidPattern" value="Package name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="TypeName">
|
||||
<message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MemberName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ParameterName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="LocalVariableName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<property name="allowOneCharVarInForLoop" value="true"/>
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<message key="name.invalidPattern" value="Local variable name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ClassTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern" value="Class type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MethodTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern" value="Method type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="InterfaceTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern" value="Interface type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="NoFinalizer"/>
|
||||
<module name="GenericWhitespace">
|
||||
<message key="ws.notPreceded" value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
||||
<message key="ws.followed" value="GenericWhitespace ''{0}'' is followed by whitespace."/>
|
||||
<message key="ws.preceded" value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
|
||||
<message key="ws.illegalFollow" value="GenericWhitespace ''{0}'' should followed by whitespace."/>
|
||||
</module>
|
||||
<module name="Indentation">
|
||||
<property name="basicOffset" value="4"/>
|
||||
<property name="caseIndent" value="4"/>
|
||||
<property name="arrayInitIndent" value="4"/>
|
||||
</module>
|
||||
<module name="AbbreviationAsWordInName">
|
||||
<property name="allowedAbbreviationLength" value="1"/>
|
||||
<property name="ignoreFinal" value="false"/>
|
||||
</module>
|
||||
<module name="OverloadMethodsDeclarationOrder"/>
|
||||
<module name="VariableDeclarationUsageDistance"/>
|
||||
<module name="CustomImportOrder">
|
||||
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
|
||||
<property name="specialImportsRegExp" value="com.google"/>
|
||||
<property name="sortImportsInGroupAlphabetically" value="true"/>
|
||||
</module>
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="OperatorWrap">
|
||||
<property name="option" value="NL"/>
|
||||
<property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="allowSamelineMultipleAnnotations" value="true"/>
|
||||
</module>
|
||||
<module name="NonEmptyAtclauseDescription"/>
|
||||
<module name="JavadocTagContinuationIndentation"/>
|
||||
<module name="SummaryJavadoc">
|
||||
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
|
||||
</module>
|
||||
<module name="JavadocParagraph"/>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||
</module>
|
||||
<module name="JavadocMethod">
|
||||
<property name="minLineCount" value="2"/>
|
||||
<property name="allowedAnnotations" value="Override, Test"/>
|
||||
<property name="scope" value="public"/>
|
||||
<property name="allowThrowsTagsForSubclasses" value="true"/>
|
||||
<property name="allowMissingParamTags" value="true"/>
|
||||
<property name="allowMissingThrowsTags" value="true"/>
|
||||
<property name="allowMissingReturnTag" value="true"/>
|
||||
</module>
|
||||
<module name="MethodName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
|
||||
<message key="name.invalidPattern" value="Method name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="SingleLineJavadoc">
|
||||
<property name="ignoreInlineTags" value="false"/>
|
||||
</module>
|
||||
<module name="EmptyCatchBlock">
|
||||
<property name="exceptionVariableName" value="expected"/>
|
||||
</module>
|
||||
<module name="CommentsIndentation"/>
|
||||
<module name="UnusedImports"/>
|
||||
<module name="RedundantImport"/>
|
||||
<module name="MethodLength"/>
|
||||
<module name="ParameterNumber"/>
|
||||
<module name="MethodCount">
|
||||
<property name="maxTotal" value="50"/>
|
||||
<property name="maxPrivate" value="50"/>
|
||||
<property name="maxPackage" value="50"/>
|
||||
<property name="maxProtected" value="50"/>
|
||||
<property name="maxPublic" value="50"/>
|
||||
</module>
|
||||
<module name="AvoidNestedBlocks"/>
|
||||
<module name="DeclarationOrder"/>
|
||||
<module name="EmptyStatement"/>
|
||||
<module name="IllegalThrows"/>
|
||||
<module name="IllegalCatch"/>
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<module name="StringLiteralEquality"/>
|
||||
<module name="UnnecessaryParentheses"/>
|
||||
<module name="CyclomaticComplexity"/>
|
||||
</module>
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="true"/>
|
||||
</module>
|
||||
<module name="FileLength"/>
|
||||
</module>
|
||||
3
quality/checkstyle/suppression.xml
Normal file
3
quality/checkstyle/suppression.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<module name="SuppressionFilter">
|
||||
<property name="file" value="quality/checkstyle/suppressions.xml" />
|
||||
</module>
|
||||
2
src/.idea/checkstyle-idea.xml
generated
2
src/.idea/checkstyle-idea.xml
generated
@@ -3,10 +3,12 @@
|
||||
<component name="CheckStyle-IDEA">
|
||||
<option name="configuration">
|
||||
<map>
|
||||
<entry key="active-configuration" value="LOCAL_FILE:C:/Users/ceren/Desktop/lastGreenify/template-master/quality/checkstyle/checkstyle.xml:cse" />
|
||||
<entry key="checkstyle-version" value="8.16" />
|
||||
<entry key="copy-libs" value="true" />
|
||||
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
|
||||
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
|
||||
<entry key="location-2" value="LOCAL_FILE:C:/Users/ceren/Desktop/lastGreenify/template-master/quality/checkstyle/checkstyle.xml:cse" />
|
||||
<entry key="scan-before-checkin" value="false" />
|
||||
<entry key="scanscope" value="JavaOnly" />
|
||||
<entry key="suppress-errors" value="false" />
|
||||
|
||||
732
src/.idea/workspace.xml
generated
732
src/.idea/workspace.xml
generated
@@ -74,34 +74,28 @@
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="src" type="f1a62948:ProjectNode" />
|
||||
<item name="OOPP" type="2d1252cf:ModuleNode" />
|
||||
<item name=":src:Client" type="2d1252cf:ModuleNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="src" type="f1a62948:ProjectNode" />
|
||||
<item name="OOPP" type="2d1252cf:ModuleNode" />
|
||||
<item name="Source Sets" type="e897c970:GradleViewContributor$SourceSetsNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="src" type="f1a62948:ProjectNode" />
|
||||
<item name="OOPP" type="2d1252cf:ModuleNode" />
|
||||
<item name=":src:Client" type="2d1252cf:ModuleNode" />
|
||||
<item name="Tasks" type="e4a08cd1:TasksNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="src" type="f1a62948:ProjectNode" />
|
||||
<item name="OOPP" type="2d1252cf:ModuleNode" />
|
||||
<item name="Tasks" type="e4a08cd1:TasksNode" />
|
||||
<item name="application" type="c8890929:TasksNode$1" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="src" type="f1a62948:ProjectNode" />
|
||||
<item name="OOPP" type="2d1252cf:ModuleNode" />
|
||||
<item name=":src:Client" type="2d1252cf:ModuleNode" />
|
||||
<item name="Tasks" type="e4a08cd1:TasksNode" />
|
||||
<item name="build" type="c8890929:TasksNode$1" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="src" type="f1a62948:ProjectNode" />
|
||||
<item name=":src:Client" type="2d1252cf:ModuleNode" />
|
||||
<item name="Tasks" type="e4a08cd1:TasksNode" />
|
||||
<item name="verification" type="c8890929:TasksNode$1" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</tree_state>
|
||||
@@ -109,22 +103,89 @@
|
||||
</state>
|
||||
</system>
|
||||
</component>
|
||||
<component name="FavoritesManager">
|
||||
<favorites_list name="src" />
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/../build.gradle">
|
||||
<entry file="file://$PROJECT_DIR$/Server/build.gradle">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="247">
|
||||
<caret line="23" column="49" selection-start-line="23" selection-start-column="49" selection-end-line="23" selection-end-column="49" />
|
||||
<state relative-caret-position="170">
|
||||
<caret line="34" selection-start-line="34" selection-end-line="48" selection-end-column="1" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/Application.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="561">
|
||||
<caret line="33" column="5" lean-forward="true" selection-start-line="33" selection-start-column="5" selection-end-line="33" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#664#665#0" expanded="true" />
|
||||
<element signature="e#692#693#0" expanded="true" />
|
||||
<element signature="e#1592#1593#0" expanded="true" />
|
||||
<element signature="e#1628#1629#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/DashBoardController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="183">
|
||||
<caret line="72" column="50" lean-forward="true" selection-start-line="72" selection-start-column="50" selection-end-line="72" selection-end-column="50" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/UserController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="190">
|
||||
<caret line="97" column="48" selection-start-line="97" selection-start-column="48" selection-end-line="97" selection-end-column="48" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/RegisterWindowController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="171">
|
||||
<caret line="35" column="8" selection-start-line="35" selection-start-column="8" selection-end-line="35" selection-end-column="8" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/rest/UserService.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="306">
|
||||
<caret line="18" column="11" selection-start-line="18" selection-start-column="11" selection-end-line="18" selection-end-column="11" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/resources/application.properties">
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/test/java/UserServiceTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="85">
|
||||
<caret line="5" column="30" selection-start-line="5" selection-start-column="30" selection-end-line="5" selection-end-column="30" />
|
||||
<state relative-caret-position="119">
|
||||
<caret line="7" column="27" selection-start-line="7" selection-start-column="27" selection-end-line="7" selection-end-column="27" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -155,21 +216,15 @@
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/gogreen/server/rest/UserController.java" />
|
||||
<option value="$PROJECT_DIR$/Common/src/main/java/gogreen/common/ErrorResponse.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/gogreen/server/rest/ExceptionHandler.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/test/java/gogreen/server/rest/UserControllerTest.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/gogreen/client/controller/UserController.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/gogreen/client/Application.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/gogreen/server/service/UserService.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/test/java/UserControllerTest.java" />
|
||||
<option value="$PROJECT_DIR$/config/checkstyle/checkstyle.xml" />
|
||||
<option value="$PROJECT_DIR$/Client/build.gradle" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/gogreen/server/rest/RestExceptionHandler.java" />
|
||||
<option value="$PROJECT_DIR$/Common/src/test/java/gogreen/common/UserDTOTest.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/gogreen/client/rest/UserService.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/greenify/server/data/repository/UserJpaRepository.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/greenify/server/data/repository/UserRepository.java" />
|
||||
<option value="$PROJECT_DIR$/Common/src/test/java/ErrorResponseTest.java" />
|
||||
<option value="$PROJECT_DIR$/Common/src/main/java/greenify/common/ErrorResponse.java" />
|
||||
<option value="$PROJECT_DIR$/Common/src/main/java/greenify/common/UserDTO.java" />
|
||||
@@ -179,33 +234,39 @@
|
||||
<option value="$PROJECT_DIR$/Server/src/resources/application.properties" />
|
||||
<option value="$PROJECT_DIR$/Server/src/application.properties" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/resources/application.properties" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/greenify/server/data/model/User.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/test/java/UserControllerTest.java" />
|
||||
<option value="$PROJECT_DIR$/Common/build.gradle" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/resources/stylesheets/dashboardStyle.css" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/resources/fxml/dashboard.fxml" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/resources/fxml/sample.fxml" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/resources/fxml/RegisterWindow.fxml" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/resources/application.properties" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/RegisterWindowController.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/greenify/client/Application.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/UserController.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/greenify/client/rest/UserService.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/DashBoardController.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/test/java/UserServiceTest.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/test/java/ApplicationStartTest.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/test/java/ApplicationTest.java" />
|
||||
<option value="$PROJECT_DIR$/Server/build.gradle" />
|
||||
<option value="$PROJECT_DIR$/Server/src/test/java/UserRepoIntegrationTest.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/test/java/UserRepositoryTest.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/test/java/greenify/server/data/repository/UserRepositoryTest.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/greenify/server/service/UserService.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/test/java/greenify/server/service/UserServiceTest.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/greenify/server/rest/UserController.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/greenify/server/rest/MainController.java" />
|
||||
<option value="$PROJECT_DIR$/../quality/checkstyle/suppression.xml" />
|
||||
<option value="$PROJECT_DIR$/../quality/checkstyle/CSE1105.checkstyle.xml" />
|
||||
<option value="$PROJECT_DIR$/../quality/checkstyle/checkstyle.xml" />
|
||||
<option value="$PROJECT_DIR$/../build.gradle" />
|
||||
<option value="$PROJECT_DIR$/Server/build.gradle" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/greenify/server/data/model/User.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/greenify/server/data/repository/UserRepository.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/greenify/server/rest/UserController.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/main/java/greenify/server/service/UserService.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/test/java/ApplicationTest.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/test/java/greenify/server/rest/UserControllerTest.java" />
|
||||
<option value="$PROJECT_DIR$/../build.gradle" />
|
||||
<option value="$PROJECT_DIR$/Server/src/test/java/greenify/server/service/UserServiceTest.java" />
|
||||
<option value="$PROJECT_DIR$/Server/src/test/java/greenify/server/data/model/UserTest.java" />
|
||||
<option value="$PROJECT_DIR$/Common/build.gradle" />
|
||||
<option value="$PROJECT_DIR$/Client/build.gradle" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/greenify/client/Application.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/DashBoardController.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/RegisterWindowController.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/UserController.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/main/java/greenify/client/rest/UserService.java" />
|
||||
<option value="$PROJECT_DIR$/Client/src/test/java/UserServiceTest.java" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@@ -216,10 +277,9 @@
|
||||
</treeState>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds" extendedState="6">
|
||||
<option name="x" value="-9" />
|
||||
<option name="y" value="-9" />
|
||||
<option name="width" value="1110" />
|
||||
<option name="height" value="1040" />
|
||||
<option name="x" value="952" />
|
||||
<option name="width" value="977" />
|
||||
<option name="height" value="1038" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectView">
|
||||
@@ -244,27 +304,78 @@
|
||||
<item name="src" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
||||
<item name="OOPP" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="src" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Server" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Client" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="src" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
||||
<item name="OOPP" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="src" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Server" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Client" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="main" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="src" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
||||
<item name="OOPP" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="src" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Server" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Client" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="main" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="resources" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
<item name="java" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="src" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
||||
<item name="OOPP" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="C:\Users\ceren\Desktop\lastGreenify\template-master" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
||||
<item name="src" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Client" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="main" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="java" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
<item name="greenify" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="src" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
||||
<item name="OOPP" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="src" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Client" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="main" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="java" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
<item name="greenify" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
<item name="client" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="src" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
||||
<item name="OOPP" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="src" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Client" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="main" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="java" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
<item name="greenify" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
<item name="client" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
<item name="controller" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="src" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
||||
<item name="OOPP" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="src" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Client" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="main" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="java" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
<item name="greenify" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
<item name="client" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
<item name="rest" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="src" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
||||
<item name="OOPP" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="src" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Client" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="test" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="src" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
||||
<item name="OOPP" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="src" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="Client" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="test" type="2674bda8:ScopeViewTreeModel$GroupNode" />
|
||||
<item name="java" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
@@ -279,8 +390,8 @@
|
||||
<property name="Repository.Attach.JavaDocs" value="false" />
|
||||
<property name="Repository.Attach.Sources" value="false" />
|
||||
<property name="ToolWindowCheckStyle.ShowToolbar" value="false" />
|
||||
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1552831813951" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../../My Courses/OOP project/OOPP" />
|
||||
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1552838592101" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/../quality/checkstyle/checkstyle.xml" />
|
||||
<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" />
|
||||
@@ -291,6 +402,7 @@
|
||||
<recent name="gogreen.client" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\ceren\Desktop\lastGreenify\template-master\quality\checkstyle" />
|
||||
<recent name="C:\Users\ceren\Desktop\lastGreenify\template-master\src\Server\src\test\java\greenify\server\rest" />
|
||||
</key>
|
||||
</component>
|
||||
@@ -306,8 +418,8 @@
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="RunManager" selected="Gradle.src::Users:ceren:Desktop:lastGreenify:template-master [build]">
|
||||
<configuration name="src:Client [bootRun]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<component name="RunManager" selected="Gradle.src:Client [check]">
|
||||
<configuration name="src:Client [bootJar]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/Client" />
|
||||
@@ -318,7 +430,7 @@
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="bootRun" />
|
||||
<option value="bootJar" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
@@ -326,48 +438,10 @@
|
||||
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="src:Server [bootRun]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<configuration name="src:Client [build]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/Server" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="bootRun" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="src::Users:ceren:Desktop:lastGreenify:template-master [bootRun]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/.." />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="bootRun" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="src::Users:ceren:Desktop:lastGreenify:template-master [build]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/.." />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/Client" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" />
|
||||
<option name="taskDescriptions">
|
||||
@@ -383,10 +457,29 @@
|
||||
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="src::Users:ceren:Desktop:lastGreenify:template-master [clean]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<configuration name="src:Client [check]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/.." />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/Client" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="check" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="src:Client [clean]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/Client" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" />
|
||||
<option name="taskDescriptions">
|
||||
@@ -402,6 +495,25 @@
|
||||
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="src:Common [build]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/Common" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="build" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="UserControllerTest" type="JUnit" factoryName="JUnit" nameIsGenerated="true">
|
||||
<module name="OOPP.Server.test" />
|
||||
<extension name="coverage">
|
||||
@@ -419,11 +531,11 @@
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Gradle.src::Users:ceren:Desktop:lastGreenify:template-master [build]" />
|
||||
<item itemvalue="Gradle.src::Users:ceren:Desktop:lastGreenify:template-master [clean]" />
|
||||
<item itemvalue="Gradle.src::Users:ceren:Desktop:lastGreenify:template-master [bootRun]" />
|
||||
<item itemvalue="Gradle.src:Client [bootRun]" />
|
||||
<item itemvalue="Gradle.src:Server [bootRun]" />
|
||||
<item itemvalue="Gradle.src:Client [check]" />
|
||||
<item itemvalue="Gradle.src:Client [bootJar]" />
|
||||
<item itemvalue="Gradle.src:Client [build]" />
|
||||
<item itemvalue="Gradle.src:Client [clean]" />
|
||||
<item itemvalue="Gradle.src:Common [build]" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
@@ -441,35 +553,35 @@
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TestHistory">
|
||||
<history-entry file="src_Server_[test] - 2019.03.17 at 13h 45m 33s.xml">
|
||||
<configuration name="src:Server [test]" configurationId="GradleRunConfiguration" />
|
||||
<history-entry file="src_Server_[check] - 2019.03.17 at 16h 28m 10s.xml">
|
||||
<configuration name="src:Server [check]" configurationId="GradleRunConfiguration" />
|
||||
</history-entry>
|
||||
<history-entry file="src_Server_[test] - 2019.03.17 at 13h 48m 28s.xml">
|
||||
<configuration name="src:Server [test]" configurationId="GradleRunConfiguration" />
|
||||
<history-entry file="src_Server_[check] - 2019.03.17 at 16h 30m 10s.xml">
|
||||
<configuration name="src:Server [check]" configurationId="GradleRunConfiguration" />
|
||||
</history-entry>
|
||||
<history-entry file="src_Server_[test] - 2019.03.17 at 13h 49m 13s.xml">
|
||||
<configuration name="src:Server [test]" configurationId="GradleRunConfiguration" />
|
||||
<history-entry file="src_Server_[check] - 2019.03.17 at 16h 31m 50s.xml">
|
||||
<configuration name="src:Server [check]" configurationId="GradleRunConfiguration" />
|
||||
</history-entry>
|
||||
<history-entry file="src_Server_[test] - 2019.03.17 at 13h 51m 31s.xml">
|
||||
<configuration name="src:Server [test]" configurationId="GradleRunConfiguration" />
|
||||
<history-entry file="src_Server_[check] - 2019.03.17 at 16h 32m 11s.xml">
|
||||
<configuration name="src:Server [check]" configurationId="GradleRunConfiguration" />
|
||||
</history-entry>
|
||||
<history-entry file="src_Server_[test] - 2019.03.17 at 13h 52m 57s.xml">
|
||||
<configuration name="src:Server [test]" configurationId="GradleRunConfiguration" />
|
||||
<history-entry file="src_Server_[check] - 2019.03.17 at 16h 33m 39s.xml">
|
||||
<configuration name="src:Server [check]" configurationId="GradleRunConfiguration" />
|
||||
</history-entry>
|
||||
<history-entry file="src_Server_[test] - 2019.03.17 at 13h 53m 31s.xml">
|
||||
<configuration name="src:Server [test]" configurationId="GradleRunConfiguration" />
|
||||
<history-entry file="src_Common_[check] - 2019.03.17 at 16h 34m 35s.xml">
|
||||
<configuration name="src:Common [check]" configurationId="GradleRunConfiguration" />
|
||||
</history-entry>
|
||||
<history-entry file="UserControllerTest_(1) - 2019.03.17 at 13h 56m 29s.xml">
|
||||
<configuration name="UserControllerTest (1)" configurationId="JUnit" />
|
||||
<history-entry file="src_Common_[check] - 2019.03.17 at 16h 36m 03s.xml">
|
||||
<configuration name="src:Common [check]" configurationId="GradleRunConfiguration" />
|
||||
</history-entry>
|
||||
<history-entry file="UserControllerTest_(1) - 2019.03.17 at 13h 57m 01s.xml">
|
||||
<configuration name="UserControllerTest (1)" configurationId="JUnit" />
|
||||
<history-entry file="src_Common_[check] - 2019.03.17 at 16h 36m 42s.xml">
|
||||
<configuration name="src:Common [check]" configurationId="GradleRunConfiguration" />
|
||||
</history-entry>
|
||||
<history-entry file="UserControllerTest_(1) - 2019.03.17 at 13h 57m 25s.xml">
|
||||
<configuration name="UserControllerTest (1)" configurationId="JUnit" />
|
||||
<history-entry file="src_Common_[check] - 2019.03.17 at 16h 36m 49s.xml">
|
||||
<configuration name="src:Common [check]" configurationId="GradleRunConfiguration" />
|
||||
</history-entry>
|
||||
<history-entry file="UserControllerTest_(1) - 2019.03.17 at 14h 02m 58s.xml">
|
||||
<configuration name="UserControllerTest (1)" configurationId="JUnit" />
|
||||
<history-entry file="src_Client_[check] - 2019.03.17 at 16h 57m 46s.xml">
|
||||
<configuration name="src:Client [check]" configurationId="GradleRunConfiguration" />
|
||||
</history-entry>
|
||||
</component>
|
||||
<component name="TodoView">
|
||||
@@ -484,17 +596,17 @@
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
|
||||
<layout>
|
||||
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49789914" visible="true" weight="0.67785233" />
|
||||
<window_info id="Structure" order="1" sideWeight="0.5021008" side_tool="true" weight="0.17315437" />
|
||||
<window_info content_ui="combo" id="Project" order="0" sideWeight="0.49570817" weight="0.76510066" />
|
||||
<window_info id="Structure" order="1" sideWeight="0.5042194" side_tool="true" weight="0.4590604" />
|
||||
<window_info id="Image Layers" order="2" />
|
||||
<window_info id="Designer" order="3" />
|
||||
<window_info id="Capture Tool" order="4" />
|
||||
<window_info id="UI Designer" order="5" />
|
||||
<window_info id="Favorites" order="6" side_tool="true" />
|
||||
<window_info id="Favorites" order="6" sideWeight="0.50429183" side_tool="true" weight="0.7295423" />
|
||||
<window_info anchor="bottom" id="Messages" order="0" sideWeight="0.4986577" weight="0.32719547" />
|
||||
<window_info anchor="bottom" id="Message" order="1" />
|
||||
<window_info anchor="bottom" id="Find" order="2" />
|
||||
<window_info anchor="bottom" id="Run" order="3" sideWeight="0.88590604" visible="true" weight="0.41926345" />
|
||||
<window_info anchor="bottom" id="Find" order="2" weight="0.3286119" />
|
||||
<window_info active="true" anchor="bottom" id="Run" order="3" sideWeight="0.88590604" visible="true" weight="0.407932" />
|
||||
<window_info anchor="bottom" id="Debug" order="4" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
|
||||
@@ -503,7 +615,7 @@
|
||||
<window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.11409396" side_tool="true" weight="0.41926345" />
|
||||
<window_info anchor="bottom" id="Version Control" order="10" weight="0.3286119" />
|
||||
<window_info anchor="bottom" id="Build" order="11" weight="0.3286119" />
|
||||
<window_info anchor="bottom" id="CheckStyle" order="12" weight="0.3295129" />
|
||||
<window_info anchor="bottom" id="CheckStyle" order="12" weight="0.33144477" />
|
||||
<window_info anchor="right" id="Coverage" order="0" sideWeight="0.8077922" side_tool="true" visible="true" weight="0.4395973" />
|
||||
<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.24966443" />
|
||||
@@ -513,7 +625,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	" order="8" />
|
||||
<window_info anchor="right" id="Gradle" order="9" sideWeight="0.1922078" weight="0.23959732" />
|
||||
<window_info anchor="right" id="Gradle" order="9" sideWeight="0.1922078" visible="true" weight="0.11543624" />
|
||||
</layout>
|
||||
<layout-to-restore>
|
||||
<window_info content_ui="combo" id="Project" order="0" sideWeight="0.49789914" weight="0.67785233" />
|
||||
@@ -553,9 +665,6 @@
|
||||
<option name="FILTER_TARGETS" value="false" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/settings.gradle" />
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/gogreen/client/rest/UserService.java" />
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/gogreen/client/controller/UserController.java" />
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/gogreen/client/Application.java" />
|
||||
<entry file="file://$PROJECT_DIR$/../settings.gradle">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
@@ -594,25 +703,8 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Common/build.gradle">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="204">
|
||||
<caret line="12" column="22" selection-start-line="12" selection-start-column="22" selection-end-line="12" selection-end-column="22" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/data/repository/UserJpaRepository.java" />
|
||||
<entry file="file://$PROJECT_DIR$/Common/src/test/java/UserDTOTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="377">
|
||||
<caret line="24" column="1" selection-start-line="24" selection-start-column="1" selection-end-line="24" selection-end-column="1" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Common/src/main/java/greenify/common/UserDTO.java">
|
||||
<entry file="file://$PROJECT_DIR$/Common/src/main/java/greenify/common/UserDto.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="187">
|
||||
<caret line="11" column="22" selection-start-line="11" selection-start-column="22" selection-end-line="11" selection-end-column="22" />
|
||||
@@ -634,9 +726,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/../CSE1105.checkstyle.xml">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/resources/fxml/dashboard.fxml">
|
||||
<provider editor-type-id="JavaFX-Scene-Builder" />
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
@@ -660,53 +749,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/data/model/User.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="697">
|
||||
<caret line="41" lean-forward="true" selection-start-line="41" selection-end-line="41" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/DashBoardController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="342">
|
||||
<caret line="69" column="8" selection-start-line="69" selection-start-column="8" selection-end-line="69" selection-end-column="8" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/RegisterWindowController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="35">
|
||||
<caret line="27" column="32" selection-start-line="27" selection-start-column="32" selection-end-line="27" selection-end-column="32" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/UserController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1000">
|
||||
<caret line="102" column="25" selection-start-line="102" selection-start-column="25" selection-end-line="102" selection-end-column="25" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/rest/UserService.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-585">
|
||||
<caret line="17" column="10" selection-start-line="17" selection-start-column="10" selection-end-line="17" selection-end-column="10" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/test/java/ApplicationStartTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="187">
|
||||
@@ -722,18 +764,6 @@
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/test/java/ApplicationTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/Application.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-193">
|
||||
<caret line="13" column="13" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="13" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#664#665#0" expanded="true" />
|
||||
<element signature="e#692#693#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/test/java/UserRepoIntegrationTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="68">
|
||||
@@ -741,16 +771,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/data/repository/UserRepository.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="170">
|
||||
<caret line="10" selection-start-line="10" selection-end-line="10" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.0.9.RELEASE/ab4feec73b188109eb1a3aa8aed83c1f97ed1168/spring-core-5.0.9.RELEASE-sources.jar!/org/springframework/util/Assert.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="164">
|
||||
@@ -758,43 +778,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/build.gradle">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="158">
|
||||
<caret line="37" column="58" selection-start-line="37" selection-start-column="58" selection-end-line="37" selection-end-column="58" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/test/java/UserServiceTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="639">
|
||||
<caret line="46" column="104" selection-start-line="46" selection-start-column="104" selection-end-line="46" selection-end-column="104" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/test/java/greenify/server/data/model/UserTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="238">
|
||||
<caret line="14" column="6" lean-forward="true" selection-start-line="14" selection-start-column="6" selection-end-line="14" selection-end-column="6" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/service/UserService.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="650">
|
||||
<caret line="67" lean-forward="true" selection-start-line="67" selection-end-line="67" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Common/src/main/java/greenify/common/ApplicationException.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
@@ -826,36 +809,6 @@
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/rest/MainController.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/test/java/greenify/server/rest/UserControllerTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state>
|
||||
<caret selection-start-column="2" selection-end-column="31" />
|
||||
<folding>
|
||||
<element signature="e#0#2734#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/test/java/greenify/server/service/UserServiceTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="323">
|
||||
<caret line="19" column="13" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/test/java/ApplicationTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="221">
|
||||
<caret line="13" column="50" selection-start-line="13" selection-start-column="50" selection-end-line="13" selection-end-column="50" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/Application.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="136">
|
||||
@@ -866,24 +819,211 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/rest/UserController.java">
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/resources/application.properties">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="114">
|
||||
<caret line="16" column="4" selection-start-line="16" selection-start-column="4" selection-end-line="16" selection-end-column="4" />
|
||||
<state relative-caret-position="85">
|
||||
<caret line="5" column="30" selection-start-line="5" selection-start-column="30" selection-end-line="5" selection-end-column="30" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/../quality/checkstyle/suppression.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="9" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/../quality/checkstyle/CSE1105.checkstyle.xml">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/../quality/checkstyle/checkstyle.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="85">
|
||||
<caret line="5" column="3" selection-start-line="5" selection-start-column="3" selection-end-line="5" selection-end-column="3" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/../build.gradle">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="247">
|
||||
<caret line="23" column="49" selection-start-line="23" selection-start-column="49" selection-end-line="23" selection-end-column="49" />
|
||||
<state relative-caret-position="-518">
|
||||
<caret line="17" column="47" selection-start-line="17" selection-start-column="47" selection-end-line="17" selection-end-column="47" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/resources/application.properties">
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/data/model/User.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="285">
|
||||
<caret line="92" column="4" selection-start-line="92" selection-start-column="4" selection-end-line="92" selection-end-column="4" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#1151#1152#0" expanded="true" />
|
||||
<element signature="e#1177#1178#0" expanded="true" />
|
||||
<element signature="e#1211#1212#0" expanded="true" />
|
||||
<element signature="e#1240#1241#0" expanded="true" />
|
||||
<element signature="e#1172#1173#0" expanded="true" />
|
||||
<element signature="e#1199#1200#0" expanded="true" />
|
||||
<element signature="e#1400#1401#0" expanded="true" />
|
||||
<element signature="e#1433#1434#0" expanded="true" />
|
||||
<element signature="e#1538#1539#0" expanded="true" />
|
||||
<element signature="e#1569#1570#0" expanded="true" />
|
||||
<element signature="e#1617#1618#0" expanded="true" />
|
||||
<element signature="e#1658#1659#0" expanded="true" />
|
||||
<element signature="e#1774#1775#0" expanded="true" />
|
||||
<element signature="e#1806#1807#0" expanded="true" />
|
||||
<element signature="e#1853#1854#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/data/repository/UserRepository.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="187">
|
||||
<caret line="11" selection-start-line="11" selection-end-line="11" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/rest/UserController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="295">
|
||||
<caret line="42" column="11" selection-start-line="42" selection-start-column="11" selection-end-line="42" selection-end-column="11" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/test/java/greenify/server/rest/UserControllerTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="199">
|
||||
<caret line="46" column="18" selection-start-line="46" selection-start-column="18" selection-end-line="46" selection-end-column="18" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/test/java/greenify/server/service/UserServiceTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="85">
|
||||
<caret line="5" column="30" selection-start-line="5" selection-start-column="30" selection-end-line="5" selection-end-column="30" />
|
||||
<caret line="5" selection-start-line="5" selection-end-line="5" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/test/java/greenify/server/data/model/UserTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="68">
|
||||
<caret line="4" selection-start-line="4" selection-end-line="4" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/main/java/greenify/server/service/UserService.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="217">
|
||||
<caret line="65" column="5" selection-start-line="65" selection-start-column="5" selection-end-line="65" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Common/src/test/java/UserDtoTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state>
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Common/build.gradle">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="85">
|
||||
<caret line="36" column="1" selection-start-line="22" selection-end-line="36" selection-end-column="1" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/build.gradle">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="336">
|
||||
<caret line="35" selection-start-line="35" selection-end-line="35" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/src/test/java/ApplicationTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="187">
|
||||
<caret line="11" column="1" selection-start-line="11" selection-start-column="1" selection-end-line="11" selection-end-column="1" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Server/build.gradle">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="170">
|
||||
<caret line="34" selection-start-line="34" selection-end-line="48" selection-end-column="1" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/Application.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="561">
|
||||
<caret line="33" column="5" lean-forward="true" selection-start-line="33" selection-start-column="5" selection-end-line="33" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#664#665#0" expanded="true" />
|
||||
<element signature="e#692#693#0" expanded="true" />
|
||||
<element signature="e#1592#1593#0" expanded="true" />
|
||||
<element signature="e#1628#1629#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/RegisterWindowController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="171">
|
||||
<caret line="35" column="8" selection-start-line="35" selection-start-column="8" selection-end-line="35" selection-end-column="8" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/DashBoardController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="183">
|
||||
<caret line="72" column="50" lean-forward="true" selection-start-line="72" selection-start-column="50" selection-end-line="72" selection-end-column="50" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/controller/UserController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="190">
|
||||
<caret line="97" column="48" selection-start-line="97" selection-start-column="48" selection-end-line="97" selection-end-column="48" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/main/java/greenify/client/rest/UserService.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="306">
|
||||
<caret line="18" column="11" selection-start-line="18" selection-start-column="11" selection-end-line="18" selection-end-column="11" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Client/src/test/java/UserServiceTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="119">
|
||||
<caret line="7" column="27" selection-start-line="7" selection-start-column="27" selection-end-line="7" selection-end-column="27" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
||||
@@ -13,32 +13,27 @@ 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')
|
||||
// }
|
||||
//}
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
def configDir = "${project.rootDir}/quality"
|
||||
|
||||
checkstyle {
|
||||
toolVersion '7.8.1'
|
||||
configFile file("$configDir/checkstyle/checkstyle.xml")
|
||||
configProperties.checkstyleSuppressionsPath = file("$configDir/checkstyle/suppressions.xml").absolutePath
|
||||
}
|
||||
|
||||
checkstyleMain {
|
||||
source ='src/main/java'
|
||||
}
|
||||
|
||||
checkstyleTest {
|
||||
source ='src/test/java'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@SpringBootApplication
|
||||
public class Application extends javafx.application.Application {
|
||||
private static ConfigurableApplicationContext springContext;
|
||||
@@ -19,16 +21,16 @@ public class Application extends javafx.application.Application {
|
||||
launch(args);
|
||||
}
|
||||
|
||||
public static Parent load(java.net.URL url) {
|
||||
/**
|
||||
* This method takes an url and return a parent.
|
||||
* @param url which is being loaded.
|
||||
* @return parent object.
|
||||
*/
|
||||
public static Parent load(java.net.URL url) throws IOException {
|
||||
FXMLLoader loader = new FXMLLoader();
|
||||
loader.setControllerFactory(springContext::getBean);
|
||||
loader.setLocation(url);
|
||||
try {
|
||||
return loader.load();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
return loader.load();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,17 +17,17 @@ public class DashBoardController {
|
||||
private int count = 0;
|
||||
|
||||
@FXML
|
||||
public AnchorPane menuBar;
|
||||
public AnchorPane dashboardPane;
|
||||
public AnchorPane userPane;
|
||||
public AnchorPane activitiesPane;
|
||||
public Label welcomebacktext;
|
||||
public Button dashboardButton;
|
||||
public Button activitiesButton;
|
||||
public Button userButton;
|
||||
public Button veganMealButton;
|
||||
public Label counter;
|
||||
public Label scoreField;
|
||||
private AnchorPane menuBar;
|
||||
private AnchorPane dashboardPane;
|
||||
private AnchorPane userPane;
|
||||
private AnchorPane activitiesPane;
|
||||
private Label welcomebacktext;
|
||||
private Button dashboardButton;
|
||||
private Button activitiesButton;
|
||||
private Button userButton;
|
||||
private Button veganMealButton;
|
||||
private Label counter;
|
||||
private Label scoreField;
|
||||
|
||||
/**
|
||||
* displays the dashboard pane.
|
||||
@@ -70,7 +70,8 @@ public class DashBoardController {
|
||||
count++;
|
||||
counter.setText("Count: " + count);
|
||||
System.out.println(userService);
|
||||
userService.addVeganMeal(userService.currentUser.getId(), userService.currentUser.getName());
|
||||
userService.addVeganMeal(userService.currentUser.getId(),
|
||||
userService.currentUser.getName());
|
||||
System.out.println("Vegetarian meal is added");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class RegisterWindowController {
|
||||
*/
|
||||
@FXML
|
||||
public void handleSignUpButton(ActionEvent event) {
|
||||
//set the window to the current window (for displaying the alerts)
|
||||
//set the window to the current window (for displaying the alerts)
|
||||
Window owner = signupButton.getScene().getWindow();
|
||||
//check if the username field is empty
|
||||
if (userNameText.getText().isEmpty()) {
|
||||
|
||||
@@ -4,7 +4,6 @@ import greenify.client.Application;
|
||||
import greenify.client.rest.UserService;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Alert;
|
||||
@@ -24,15 +23,9 @@ public class UserController {
|
||||
UserService userService;
|
||||
|
||||
@FXML
|
||||
public TextField usernameField;
|
||||
|
||||
@FXML
|
||||
private TextField usernameField;
|
||||
private PasswordField passwordField;
|
||||
|
||||
@FXML
|
||||
private Button loginButton;
|
||||
|
||||
@FXML
|
||||
private Button signupButton;
|
||||
|
||||
@FXML
|
||||
@@ -65,9 +58,11 @@ public class UserController {
|
||||
* @author sem
|
||||
*/
|
||||
public void openDashboard() throws IOException {
|
||||
Parent dash = Application.load (this.getClass().getClassLoader().getResource("fxml/dashboard.fxml"));
|
||||
Parent dash = Application.load(this.getClass().getClassLoader()
|
||||
.getResource("fxml/dashboard.fxml"));
|
||||
Scene scene = new Scene(dash);
|
||||
scene.getStylesheets().add(getClass().getClassLoader().getResource("stylesheets/dashboardStyle.css").toExternalForm());
|
||||
scene.getStylesheets().add(getClass().getClassLoader()
|
||||
.getResource("stylesheets/dashboardStyle.css").toExternalForm());
|
||||
Stage appStage = new Stage();
|
||||
appStage.setScene(scene);
|
||||
appStage.show();
|
||||
@@ -94,13 +89,16 @@ public class UserController {
|
||||
}
|
||||
}
|
||||
|
||||
public void handleRegisterButtonAction(ActionEvent event) throws Exception{
|
||||
//load the fxml file
|
||||
Parent registerWindow = Application.load (this.getClass().getClassLoader().getResource("fxml/RegisterWindow.fxml"));
|
||||
//make the window use the scene
|
||||
/**
|
||||
* The method handles register button.
|
||||
* @param event User clicks to the button
|
||||
* @throws Exception when the file couldn't find
|
||||
*/
|
||||
public void handleRegisterButtonAction(ActionEvent event) throws Exception {
|
||||
Parent registerWindow = Application.load(this.getClass().getClassLoader()
|
||||
.getResource("fxml/RegisterWindow.fxml"));
|
||||
Scene registerScene = new Scene(registerWindow);
|
||||
Stage registerStage = new Stage();
|
||||
//open the window
|
||||
registerStage.setScene(registerScene);
|
||||
registerStage.setTitle("Enter register credentials");
|
||||
registerStage.show();
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package greenify.client.rest;
|
||||
|
||||
import greenify.common.UserDTO;
|
||||
import greenify.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.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
@@ -15,7 +16,7 @@ public class UserService {
|
||||
@Autowired
|
||||
RestTemplate restTemplate;
|
||||
|
||||
public UserDTO currentUser;
|
||||
public UserDto currentUser;
|
||||
|
||||
@Bean
|
||||
RestTemplate restTemplate(RestTemplateBuilder builder) {
|
||||
@@ -28,7 +29,7 @@ public class UserService {
|
||||
* @param password the password of the user
|
||||
* @return a userDTO
|
||||
*/
|
||||
public UserDTO registerUser(String name, String password) {
|
||||
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")
|
||||
@@ -36,7 +37,8 @@ public class UserService {
|
||||
.queryParam("password", password);
|
||||
HttpEntity<?> entity = new HttpEntity<>(headers);
|
||||
System.out.println(builder.build().encode().toUri());
|
||||
UserDTO result = this.restTemplate.getForObject(builder.build().encode().toUri(), UserDTO.class);
|
||||
UserDto result = this.restTemplate.getForObject(builder.build()
|
||||
.encode().toUri(), UserDto.class);
|
||||
this.currentUser = result;
|
||||
return result;
|
||||
}
|
||||
@@ -47,7 +49,7 @@ public class UserService {
|
||||
* @param password the password of the user
|
||||
* @return a userDTO
|
||||
*/
|
||||
public UserDTO loginUser(String name, String password) {
|
||||
public UserDto loginUser(String name, String password) {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
|
||||
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/loginUser")
|
||||
@@ -55,7 +57,8 @@ public class UserService {
|
||||
.queryParam("password", password);
|
||||
HttpEntity<?> entity = new HttpEntity<>(headers);
|
||||
System.out.println(builder.build().encode().toUri());
|
||||
UserDTO result = this.restTemplate.getForObject(builder.build().encode().toUri(), UserDTO.class);
|
||||
UserDto result = this.restTemplate.getForObject(builder.build()
|
||||
.encode().toUri(), UserDto.class);
|
||||
this.currentUser = result;
|
||||
return result;
|
||||
}
|
||||
@@ -66,7 +69,7 @@ public class UserService {
|
||||
* @param name the username of the user
|
||||
* @return a userDTO
|
||||
*/
|
||||
public UserDTO addVeganMeal(Long id, String name) {
|
||||
public UserDto addVeganMeal(Long id, String name) {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
|
||||
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080/addVeganMeal")
|
||||
@@ -74,6 +77,6 @@ public class UserService {
|
||||
.queryParam("name", name);
|
||||
HttpEntity<?> entity = new HttpEntity<>(headers);
|
||||
System.out.println(builder.build().encode().toUri());
|
||||
return this.restTemplate.getForObject(builder.build().encode().toUri(), UserDTO.class);
|
||||
return this.restTemplate.getForObject(builder.build().encode().toUri(), UserDto.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import greenify.client.rest.UserService;
|
||||
import greenify.common.UserDTO;
|
||||
import greenify.common.UserDto;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.*;
|
||||
import org.mockito.InjectMocks;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.Spy;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -22,32 +25,32 @@ public class UserServiceTest {
|
||||
|
||||
@Test
|
||||
public void userRegisterTest() throws Exception {
|
||||
UserDTO testUser = new UserDTO(1L, "Eric");
|
||||
UserDto testUser = new UserDto(1L, "Eric");
|
||||
Mockito.when(restTemplate.getForObject(new java.net.URI("http://localhost:8080/registerUser?name=Eric&password=password"),
|
||||
UserDTO.class))
|
||||
UserDto.class))
|
||||
.thenReturn(testUser);
|
||||
|
||||
UserDTO user = userService.registerUser("Eric", "password");
|
||||
UserDto user = userService.registerUser("Eric", "password");
|
||||
Assert.assertEquals(testUser, user);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void userLoginTest() throws Exception {
|
||||
UserDTO testUser = new UserDTO(1L, "Eric");
|
||||
UserDto testUser = new UserDto(1L, "Eric");
|
||||
Mockito.when(restTemplate.getForObject(new java.net.URI("http://localhost:8080/loginUser?name=Eric&password=password"),
|
||||
UserDTO.class))
|
||||
UserDto.class))
|
||||
.thenReturn(testUser);
|
||||
UserDTO user = userService.loginUser("Eric", "password");
|
||||
UserDto user = userService.loginUser("Eric", "password");
|
||||
Assert.assertEquals(testUser, user);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addVeganMealTest() throws Exception {
|
||||
UserDTO testUser = new UserDTO(1L, "Eric");
|
||||
UserDto testUser = new UserDto(1L, "Eric");
|
||||
Mockito.when(restTemplate.getForObject(new java.net.URI("http://localhost:8080/addVeganMeal?id=1&name=Eric"),
|
||||
UserDTO.class))
|
||||
UserDto.class))
|
||||
.thenReturn(testUser);
|
||||
UserDTO user = userService.addVeganMeal(1L, "Eric");
|
||||
UserDto user = userService.addVeganMeal(1L, "Eric");
|
||||
Assert.assertEquals(testUser, user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'jacoco'
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
@@ -19,6 +20,22 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
def configDir = "${project.rootDir}/quality"
|
||||
|
||||
checkstyle {
|
||||
toolVersion '7.8.1'
|
||||
configFile file("$configDir/checkstyle/checkstyle.xml")
|
||||
configProperties.checkstyleSuppressionsPath = file("$configDir/checkstyle/suppressions.xml").absolutePath
|
||||
}
|
||||
|
||||
checkstyleMain {
|
||||
source ='src/main/java'
|
||||
}
|
||||
|
||||
checkstyleTest {
|
||||
source ='src/test/java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile("junit:junit")
|
||||
testCompile(
|
||||
|
||||
@@ -4,15 +4,14 @@ package greenify.common;
|
||||
// is an object that carries data between processes.
|
||||
// The motivation for its use is that communication between processes is usually done
|
||||
// resorting to remote interfaces (e.g., web services), where each call is an expensive operation.
|
||||
public class UserDTO {
|
||||
|
||||
public class UserDto {
|
||||
private Long id;
|
||||
private String name;
|
||||
|
||||
public UserDTO() {
|
||||
public UserDto() {
|
||||
}
|
||||
|
||||
public UserDTO(Long id, String name) {
|
||||
public UserDto(Long id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
import greenify.common.ErrorResponse;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import greenify.common.ErrorResponse;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ErrorResponseTest {
|
||||
@Test
|
||||
public void setAndGetTest() {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import greenify.common.UserDTO;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class UserDTOTest {
|
||||
import greenify.common.UserDto;
|
||||
import org.junit.Test;
|
||||
|
||||
public class UserDtoTest {
|
||||
@Test
|
||||
public void setAndGetTest() {
|
||||
UserDTO user = new UserDTO(1L, "greenify");
|
||||
UserDTO testUser = new UserDTO();
|
||||
UserDto user = new UserDto(1L, "greenify");
|
||||
UserDto testUser = new UserDto();
|
||||
testUser.setId(1L);
|
||||
testUser.setName("greenify");
|
||||
assertTrue(user.getId() == 1L);
|
||||
@@ -17,8 +17,8 @@ public class UserDTOTest {
|
||||
|
||||
@Test
|
||||
public void equalsTest() {
|
||||
UserDTO first = new UserDTO(1L, "greenify");
|
||||
UserDTO second = new UserDTO(1L, "greenify");
|
||||
UserDto first = new UserDto(1L, "greenify");
|
||||
UserDto second = new UserDto(1L, "greenify");
|
||||
assertEquals(first.getId(), second.getId());
|
||||
assertEquals(first.getName(), second.getName());
|
||||
}
|
||||
@@ -13,6 +13,7 @@ apply plugin: 'idea'
|
||||
apply plugin: 'org.springframework.boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
apply plugin: 'jacoco'
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
bootJar {
|
||||
baseName = 'gs-rest-service'
|
||||
@@ -31,6 +32,22 @@ repositories {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
def configDir = "${project.rootDir}/quality"
|
||||
|
||||
checkstyle {
|
||||
toolVersion '7.8.1'
|
||||
configFile file("$configDir/checkstyle/checkstyle.xml")
|
||||
configProperties.checkstyleSuppressionsPath = file("$configDir/checkstyle/suppressions.xml").absolutePath
|
||||
}
|
||||
|
||||
checkstyleMain {
|
||||
source ='src/main/java'
|
||||
}
|
||||
|
||||
checkstyleTest {
|
||||
source ='src/test/java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile("org.springframework.boot:spring-boot-starter-web")
|
||||
testCompile('org.springframework.boot:spring-boot-starter-test')
|
||||
|
||||
@@ -3,9 +3,12 @@ package greenify.server.data.model;
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Objects;
|
||||
|
||||
@EnableAutoConfiguration
|
||||
@Entity
|
||||
@@ -49,7 +52,9 @@ public class User {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the name.
|
||||
@@ -59,7 +64,9 @@ public class User {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) { this.name = name; }
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the password.
|
||||
@@ -69,7 +76,9 @@ public class User {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) { this.password = password; }
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the number of vegan meal.
|
||||
@@ -79,58 +88,7 @@ public class User {
|
||||
return veganMeal;
|
||||
}
|
||||
|
||||
public void setVeganMeal(int veganMeal) { this.veganMeal = veganMeal; }
|
||||
|
||||
/**
|
||||
* checks if two users are equal.
|
||||
* @param other the object to compare the user with
|
||||
* @return a boolean value of true if the user is equal to the object
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (other == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != other.getClass()) {
|
||||
return false;
|
||||
}
|
||||
if (other instanceof User) {
|
||||
User that = (User) other;
|
||||
return this.getName().equals(that.getName())
|
||||
&& this.getId().equals(that.getId())
|
||||
&& this.getPassword().equals(that.getPassword())
|
||||
&& this.getVeganMeal() == that.getVeganMeal();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* creates a string of the user object.
|
||||
* in the form of: User(id=, name=, password=, veganMeal=)
|
||||
* @return a string of the user object
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User(id="
|
||||
+ this.id
|
||||
+ ", name="
|
||||
+ this.name
|
||||
+ ", password="
|
||||
+ this.password
|
||||
+ ", veganMeal="
|
||||
+ this.veganMeal + ")";
|
||||
}
|
||||
|
||||
/**
|
||||
* hashes the User object.
|
||||
* @return a hashcode for the user object
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, password, veganMeal);
|
||||
public void setVeganMeal(int veganMeal) {
|
||||
this.veganMeal = veganMeal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package greenify.server.data.repository;
|
||||
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import greenify.server.data.model.User;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
public interface UserRepository extends CrudRepository<User, Integer> {
|
||||
User findByName(String name);
|
||||
|
||||
<T extends User> T save(T user);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package greenify.server.rest;
|
||||
|
||||
import greenify.common.UserDTO;
|
||||
import greenify.common.UserDto;
|
||||
import greenify.server.data.model.User;
|
||||
import greenify.server.data.repository.UserRepository;
|
||||
import greenify.server.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class UserController {
|
||||
@@ -17,27 +21,27 @@ public class UserController {
|
||||
UserRepository userRepository;
|
||||
|
||||
@RequestMapping("/registerUser")
|
||||
public UserDTO registerUser(@RequestParam(value = "name") String name,
|
||||
public UserDto registerUser(@RequestParam(value = "name") String name,
|
||||
@RequestParam(value = "password") String password) {
|
||||
return userService.registerUser(name, password);
|
||||
}
|
||||
|
||||
@RequestMapping("/loginUser")
|
||||
public UserDTO loginUser(@RequestParam(value = "name") String name,
|
||||
@RequestParam(value = "password") String password) {
|
||||
public UserDto loginUser(@RequestParam(value = "name") String name,
|
||||
@RequestParam(value = "password") String password) {
|
||||
return userService.loginUser(name, password);
|
||||
}
|
||||
|
||||
@GetMapping(path="/all")
|
||||
public @ResponseBody
|
||||
Iterable<User> getAllUsers() {
|
||||
// This returns a JSON or XML with the users
|
||||
return userRepository.findAll();
|
||||
}
|
||||
|
||||
@RequestMapping("/addVeganMeal")
|
||||
public void addVeganMeal(@RequestParam(value = "id") Long id,
|
||||
@RequestParam(value = "name") String name) {
|
||||
userService.addVeganMeal(id, name);
|
||||
}
|
||||
|
||||
@GetMapping(path = "/all")
|
||||
@ResponseBody
|
||||
public Iterable<User> getAllUsers() {
|
||||
// This returns a JSON or XML with the users
|
||||
return userRepository.findAll();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package greenify.server.service;
|
||||
|
||||
import greenify.common.ApplicationException;
|
||||
import greenify.common.UserDTO;
|
||||
import greenify.common.UserDto;
|
||||
import greenify.server.data.model.User;
|
||||
import greenify.server.data.repository.UserRepository;
|
||||
import org.slf4j.Logger;
|
||||
@@ -21,7 +21,7 @@ public class UserService {
|
||||
* @param password the password of the user
|
||||
* @return a userDTO of the registered user
|
||||
*/
|
||||
public UserDTO registerUser(String name, String password) {
|
||||
public UserDto registerUser(String name, String password) {
|
||||
User user = userRepository.findByName(name);
|
||||
if (user == null) {
|
||||
user = userRepository.save(new User(null, name, password, 0));
|
||||
@@ -29,7 +29,7 @@ public class UserService {
|
||||
throw new ApplicationException("User already exists");
|
||||
}
|
||||
logger.info("Created user id=" + user.getId() + ", name=" + user.getName());
|
||||
return new UserDTO(user.getId(), user.getName());
|
||||
return new UserDto(user.getId(), user.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ public class UserService {
|
||||
* @param password the password of the user
|
||||
* @return a userDTO of the logged in user
|
||||
*/
|
||||
public UserDTO loginUser(String name, String password) {
|
||||
public UserDto loginUser(String name, String password) {
|
||||
User user = userRepository.findByName(name);
|
||||
if (user == null) {
|
||||
throw new ApplicationException("User does not exist");
|
||||
@@ -47,14 +47,13 @@ public class UserService {
|
||||
throw new ApplicationException("Wrong password");
|
||||
}
|
||||
}
|
||||
return new UserDTO(user.getId(), user.getName());
|
||||
return new UserDto(user.getId(), user.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* add vegan meal to the user.
|
||||
* @param id the id of the user
|
||||
* @param name the name of the user
|
||||
* @return a userDTO of the user added vegan meal
|
||||
*/
|
||||
public void addVeganMeal(Long id, String name) {
|
||||
User user = userRepository.findByName(name);
|
||||
@@ -62,7 +61,8 @@ public class UserService {
|
||||
count++;
|
||||
user.setVeganMeal(count);
|
||||
userRepository.save(user);
|
||||
logger.info("Added vegan meal to user(id=" + user.getId() + ", name=" + user.getName() + ")");
|
||||
logger.info("Added vegan meal to user(id=" + user.getId()
|
||||
+ ", name=" + user.getName() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import greenify.server.Application;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package greenify.server.data.model;
|
||||
|
||||
import greenify.server.data.model.User;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class UserTest {
|
||||
@Test
|
||||
public void setAndGetTest() {
|
||||
User user = new User(1L, "greenify", "password", 3);
|
||||
User testUser = new User();
|
||||
testUser.setId(1L);
|
||||
testUser.setName("greenify");
|
||||
testUser.setPassword("password");
|
||||
testUser.setVeganMeal(3);
|
||||
User user = new User(1L, "greenify", "password", 3);
|
||||
assertTrue(user.getId().equals(1L));
|
||||
assertEquals(user.getName(), "greenify");
|
||||
assertEquals(user.getPassword(), "password");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//package greenify.server.rest;
|
||||
//
|
||||
//import greenify.common.UserDTO;
|
||||
//import greenify.common.UserDto;
|
||||
//import greenify.server.data.model.User;
|
||||
//import greenify.server.service.UserService;
|
||||
//import org.junit.Test;
|
||||
@@ -40,16 +40,18 @@
|
||||
// @Test
|
||||
// public void getVehicleWhenRequestingTextShouldReturnMakeAndModel() throws Exception {
|
||||
// given(this.userService.loginUser("name", "password"))
|
||||
// .willReturn(new UserDTO(1L, "name"));
|
||||
// .willReturn(new UserDto(1L, "name"));
|
||||
// this.mvc.perform(get("/loginUser").accept(MediaType.APPLICATION_JSON))
|
||||
// .andExpect(status().isOk()).andExpect(content().json("name=name, password=password"));
|
||||
// .andExpect(status().isOk())
|
||||
// .andExpect(content()
|
||||
// .json("name=name, password=password"));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Test
|
||||
// public void givenEmployees_whenGetEmployees_thenReturnJsonArray() throws Exception {
|
||||
// User alex = new User(1L, "alex", "password", 0);
|
||||
// UserDTO user = userService.loginUser("alex", "password");
|
||||
// UserDto user = userService.loginUser("alex", "password");
|
||||
// given(userService.loginUser("alex", "password")).willReturn(user);
|
||||
// mvc.perform(get("/loginUser")
|
||||
// .contentType(MediaType.ALL))
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package greenify.server.service;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import greenify.common.ApplicationException;
|
||||
import greenify.common.UserDTO;
|
||||
import greenify.common.UserDto;
|
||||
import greenify.server.data.model.User;
|
||||
import greenify.server.data.repository.UserRepository;
|
||||
import org.junit.Before;
|
||||
@@ -12,9 +16,6 @@ import org.springframework.boot.test.context.TestConfiguration;
|
||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
public class UserServiceTest {
|
||||
@@ -32,6 +33,9 @@ public class UserServiceTest {
|
||||
@MockBean
|
||||
private UserRepository userRepository;
|
||||
|
||||
/**
|
||||
* setUp method for test.
|
||||
*/
|
||||
@Before
|
||||
public void setUp() {
|
||||
User alex = new User(1L, "alex", "password", 0);
|
||||
@@ -43,18 +47,18 @@ public class UserServiceTest {
|
||||
public void validLoginTest() {
|
||||
String name = "alex";
|
||||
String password = "password";
|
||||
UserDTO found = userService.loginUser(name, password);
|
||||
UserDto found = userService.loginUser(name, password);
|
||||
assertEquals(found.getName(), name);
|
||||
}
|
||||
|
||||
// @Test
|
||||
// public void addVeganMealTest() {
|
||||
// User user = new User(1L, "x", "y", 3);
|
||||
// userRepository.save(user);
|
||||
// System.out.println(userRepository);
|
||||
// userService.addVeganMeal(1L, "x");
|
||||
// assertEquals(user.getVeganMeal(), 7);
|
||||
// }
|
||||
// @Test
|
||||
// public void addVeganMealTest() {
|
||||
// User user = new User(1L, "x", "y", 3);
|
||||
// userRepository.save(user);
|
||||
// System.out.println(userRepository);
|
||||
// userService.addVeganMeal(1L, "x");
|
||||
// assertEquals(user.getVeganMeal(), 7);
|
||||
// }
|
||||
|
||||
@Test
|
||||
public void invalidLoginTest() {
|
||||
|
||||
Reference in New Issue
Block a user