diff --git a/.classpath b/.classpath index fd287e52da5b0bd1f409127fdbc3767a841d85b3..5b2acc5be1acb42a991df32566cf5ed17416819b 100644 --- a/.classpath +++ b/.classpath @@ -6,12 +6,6 @@ <attribute name="gradle_used_by_scope" value="main,test"/> </attributes> </classpathentry> - <classpathentry kind="src" output="bin/main" path="src/main/resources"> - <attributes> - <attribute name="gradle_scope" value="main"/> - <attribute name="gradle_used_by_scope" value="main,test"/> - </attributes> - </classpathentry> <classpathentry kind="src" output="bin/test" path="src/test/java"> <attributes> <attribute name="gradle_scope" value="test"/> @@ -19,14 +13,7 @@ <attribute name="test" value="true"/> </attributes> </classpathentry> - <classpathentry kind="src" output="bin/test" path="src/test/resources"> - <attributes> - <attribute name="gradle_scope" value="test"/> - <attribute name="gradle_used_by_scope" value="test"/> - <attribute name="test" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-12/"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-13/"/> <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> <classpathentry kind="output" path="bin/default"/> </classpath> diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..00a51aff5e5a83d6313f3bd15fadc601a205b66f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..f198ec547b9190a094cdd1e56458a0ed7b8c23c8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,216 @@ +# Created by https://www.gitignore.io/api/java,gradle,eclipse,intellij,visualstudiocode +# Edit at https://www.gitignore.io/?templates=java,gradle,eclipse,intellij,visualstudiocode + +### Eclipse ### +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +### Eclipse Patch ### +# Eclipse Core +.project + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# Annotation Processing +.apt_generated + +.sts4-cache/ + +### Intellij ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +.idea/**/sonarlint/ + +# SonarQube Plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator/ + +### Java ### +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history + +### Gradle ### +.gradle +build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + +### Gradle Patch ### +**/build/ + +# End of https://www.gitignore.io/api/java,gradle,eclipse,intellij,visualstudiocode \ No newline at end of file diff --git a/.gradle/5.6.1/executionHistory/executionHistory.lock b/.gradle/5.6.1/executionHistory/executionHistory.lock deleted file mode 100644 index 48240bf1e8a25c4eea7b0e21b3982a794d35f680..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.1/executionHistory/executionHistory.lock and /dev/null differ diff --git a/.gradle/5.6.1/fileChanges/last-build.bin b/.gradle/5.6.1/fileChanges/last-build.bin deleted file mode 100644 index f76dd238ade08917e6712764a16a22005a50573d..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.1/fileChanges/last-build.bin and /dev/null differ diff --git a/.gradle/5.6.1/fileHashes/fileHashes.lock b/.gradle/5.6.1/fileHashes/fileHashes.lock deleted file mode 100644 index d10446a0f30efb182534bc1763fc60caf872ac2b..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.1/fileHashes/fileHashes.lock and /dev/null differ diff --git a/.gradle/5.6.1/gc.properties b/.gradle/5.6.1/gc.properties deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.gradle/5.6.2/executionHistory/executionHistory.bin b/.gradle/5.6.2/executionHistory/executionHistory.bin deleted file mode 100644 index f3f64b949b2b0350d45b49338dfe78431f275e60..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.2/executionHistory/executionHistory.bin and /dev/null differ diff --git a/.gradle/5.6.2/executionHistory/executionHistory.lock b/.gradle/5.6.2/executionHistory/executionHistory.lock deleted file mode 100644 index 07bef9383aec871a1aac63d9b70bae2a299da586..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.2/executionHistory/executionHistory.lock and /dev/null differ diff --git a/.gradle/5.6.2/fileChanges/last-build.bin b/.gradle/5.6.2/fileChanges/last-build.bin deleted file mode 100644 index f76dd238ade08917e6712764a16a22005a50573d..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.2/fileChanges/last-build.bin and /dev/null differ diff --git a/.gradle/5.6.2/fileContent/fileContent.lock b/.gradle/5.6.2/fileContent/fileContent.lock deleted file mode 100644 index 9721b084764551eb61b96c441e95f24256d8b40c..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.2/fileContent/fileContent.lock and /dev/null differ diff --git a/.gradle/5.6.2/fileHashes/fileHashes.bin b/.gradle/5.6.2/fileHashes/fileHashes.bin deleted file mode 100644 index 8e07aa87856742f4bf9403a932711d8dce33801d..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.2/fileHashes/fileHashes.bin and /dev/null differ diff --git a/.gradle/5.6.2/fileHashes/fileHashes.lock b/.gradle/5.6.2/fileHashes/fileHashes.lock deleted file mode 100644 index ec3fc1f8672302ef6e50c28cc0bd0637e62f4f13..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.2/fileHashes/fileHashes.lock and /dev/null differ diff --git a/.gradle/5.6.2/gc.properties b/.gradle/5.6.2/gc.properties deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.gradle/5.6.2/javaCompile/classAnalysis.bin b/.gradle/5.6.2/javaCompile/classAnalysis.bin deleted file mode 100644 index 9312077e02058fd8101e0fda873c4980ac43c018..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.2/javaCompile/classAnalysis.bin and /dev/null differ diff --git a/.gradle/5.6.2/javaCompile/javaCompile.lock b/.gradle/5.6.2/javaCompile/javaCompile.lock deleted file mode 100644 index 2ea3692ed3ca1265cc88554ed485800fc1aac977..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.2/javaCompile/javaCompile.lock and /dev/null differ diff --git a/.gradle/5.6.2/javaCompile/taskHistory.bin b/.gradle/5.6.2/javaCompile/taskHistory.bin deleted file mode 100644 index dfddc6ac2c15f9e29afd642d097d00e491a606bf..0000000000000000000000000000000000000000 Binary files a/.gradle/5.6.2/javaCompile/taskHistory.bin and /dev/null differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock deleted file mode 100644 index b254f6d6bd93d82f9f2ba5ec0813986d788278a3..0000000000000000000000000000000000000000 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and /dev/null differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties deleted file mode 100644 index bf9025ee7a7bd9fa0340a205e4221b5e62566f2f..0000000000000000000000000000000000000000 --- a/.gradle/buildOutputCleanup/cache.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Wed Nov 27 11:55:16 CET 2019 -gradle.version=5.6.2 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin deleted file mode 100644 index 3fbe6192cd70b3d2d19a5f6ab37f29132ae2c401..0000000000000000000000000000000000000000 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and /dev/null differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.project b/.project index 045ab5c078b6630363b4c9aa041c505bff6af2ed..9cf3fa392b30f9d4a8b99f441427f07cf61679b7 100644 --- a/.project +++ b/.project @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>shoes</name> - <comment>Project shoes created by Buildship.</comment> + <name>campus</name> + <comment>Project test created by Buildship.</comment> <projects> </projects> <buildSpec> diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index e8895216fd3c0c3af4c4522334775f41b7deb42e..0000000000000000000000000000000000000000 --- a/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir= -eclipse.preferences.version=1 diff --git a/bin/main/io/fp/shoes/App.class b/bin/main/io/fp/shoes/App.class deleted file mode 100644 index 50020644f805b0dbd1c5bb28ecc7d568076945eb..0000000000000000000000000000000000000000 Binary files a/bin/main/io/fp/shoes/App.class and /dev/null differ diff --git a/bin/main/io/fp/shoes/Boots.class b/bin/main/io/fp/shoes/Boots.class deleted file mode 100644 index abb1f6870975634691edea0f67df17e0f9a5ba61..0000000000000000000000000000000000000000 Binary files a/bin/main/io/fp/shoes/Boots.class and /dev/null differ diff --git a/bin/main/io/fp/shoes/Box.class b/bin/main/io/fp/shoes/Box.class deleted file mode 100644 index b86b1d84fe3d4d310d597799ee746d77e83df01a..0000000000000000000000000000000000000000 Binary files a/bin/main/io/fp/shoes/Box.class and /dev/null differ diff --git a/bin/main/io/fp/shoes/BoxException.class b/bin/main/io/fp/shoes/BoxException.class deleted file mode 100644 index d2ec53673f2eed4e3f674c13a0c8128d5e50f8e3..0000000000000000000000000000000000000000 Binary files a/bin/main/io/fp/shoes/BoxException.class and /dev/null differ diff --git a/bin/main/io/fp/shoes/Shelf.class b/bin/main/io/fp/shoes/Shelf.class deleted file mode 100644 index e88edd783da0fa3b91aaac6f05efd1bf686eaa50..0000000000000000000000000000000000000000 Binary files a/bin/main/io/fp/shoes/Shelf.class and /dev/null differ diff --git a/bin/main/io/fp/shoes/ShoeBox.class b/bin/main/io/fp/shoes/ShoeBox.class deleted file mode 100644 index bd23f58927fe2d4d2c9290a6821d6b191415b66d..0000000000000000000000000000000000000000 Binary files a/bin/main/io/fp/shoes/ShoeBox.class and /dev/null differ diff --git a/bin/main/io/fp/shoes/Shoes.class b/bin/main/io/fp/shoes/Shoes.class deleted file mode 100644 index eb92ab2bd209daa9421912b76b6ae409843b29a8..0000000000000000000000000000000000000000 Binary files a/bin/main/io/fp/shoes/Shoes.class and /dev/null differ diff --git a/bin/main/io/fp/shoes/Sneakers.class b/bin/main/io/fp/shoes/Sneakers.class deleted file mode 100644 index e523961faccd9a2ec1ce028ab48e43411782083b..0000000000000000000000000000000000000000 Binary files a/bin/main/io/fp/shoes/Sneakers.class and /dev/null differ diff --git a/build.gradle b/build.gradle index eb310c1cb00d86ca4a62335783eba305177aa6fd..186783bae21680ed8abda7e59b7ddc9992ae451c 100644 --- a/build.gradle +++ b/build.gradle @@ -3,14 +3,14 @@ * * This generated file contains a sample Java project to get you started. * For more details take a look at the Java Quickstart chapter in the Gradle - * User Manual available at https://docs.gradle.org/5.6.1/userguide/tutorial_java_projects.html + * User Manual available at https://docs.gradle.org/6.3/userguide/tutorial_java_projects.html */ plugins { // Apply the java plugin to add support for Java id 'java' - // Apply the application plugin to add support for building a CLI application + // Apply the application plugin to add support for building a CLI application. id 'application' } @@ -22,17 +22,17 @@ repositories { dependencies { // This dependency is used by the application. - implementation 'com.google.guava:guava:28.0-jre' + implementation 'com.google.guava:guava:28.2-jre' // Use JUnit Jupiter API for testing. - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0' // Use JUnit Jupiter Engine for testing. - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.2' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0' } application { - // Define the main class for the application + // Define the main class for the application. mainClassName = 'io.fp.shoes.App' } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 5c2d1cf016b3885f6930543d57b744ea8c220a1a..490fda8577df6c95960ba7077c43220e5bb2c0d9 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 59b5f89288842bf8ef144d802e597dcf482b3d70..a4b4429748d92848a3d820c7b099fbeb941066ae 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 83f2acfdc319a24e8766cca78f32474ad7a22dd6..2fe81a7d95e4f9ad2c9b2a046707d36ceb3980b3 100644 --- a/gradlew +++ b/gradlew @@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -175,14 +175,9 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=$(save "$@") +APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 9618d8d9607cd91a0efb866bcac4810064ba6fac..62bd9b9ccefea2b65ae41e5d9a545e2021b90a1d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" diff --git a/settings.gradle b/settings.gradle index ba318d91a7579b161f8282c362094704772a195d..43621cc760e4afdf4cb9308dd5ac963f116b471d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,7 +4,7 @@ * The settings file is used to specify which projects to include in your build. * * Detailed information about configuring a multi-project build in Gradle can be found - * in the user manual at https://docs.gradle.org/5.6.1/userguide/multi_project_builds.html + * in the user manual at https://docs.gradle.org/6.3/userguide/multi_project_builds.html */ -rootProject.name = 'shoes' +rootProject.name = 'campus' diff --git a/src/test/java/io/fp/shoes/shoeTest.java b/src/test/java/io/fp/shoes/shoeTest.java new file mode 100644 index 0000000000000000000000000000000000000000..38f8d1d980196aa5d458787ea361dc67f2b54782 --- /dev/null +++ b/src/test/java/io/fp/shoes/shoeTest.java @@ -0,0 +1,30 @@ +package io.fp.shoes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +/** + * shoeTest + */ +public class shoeTest { + + ShoeBox<Boots> box; + + @BeforeEach + void setUp(){ + + box = new ShoeBox<Boots>(new Boots("boot", 42)); + + } + + @Test + void boxTest(){ + + assertThrows(BoxException.class, ()->{ + + box.putObjectInBox(new Boots("antiboot", 42)); + }); + } +} \ No newline at end of file