From 6e44024e050e48d4eb320da7a950364894009eb9 Mon Sep 17 00:00:00 2001 From: H4CK3R-01 Date: Fri, 23 Jul 2021 11:08:53 +0200 Subject: [PATCH] - Added script to create javadoc - updated javadoc --- create_javadoc.sh | 1 + docs/allclasses-index.html | 10 +- docs/allpackages-index.html | 6 +- docs/constant-values.html | 83 --------- docs/de/dhbw/contactdb/Main.html | 42 +++-- docs/de/dhbw/contactdb/Person.html | 4 +- docs/de/dhbw/contactdb/Place.html | 18 +- docs/de/dhbw/contactdb/Visit.html | 18 +- docs/de/dhbw/contactdb/class-use/Main.html | 4 +- docs/de/dhbw/contactdb/class-use/Person.html | 4 +- docs/de/dhbw/contactdb/class-use/Place.html | 4 +- docs/de/dhbw/contactdb/class-use/Visit.html | 4 +- docs/de/dhbw/contactdb/package-summary.html | 10 +- docs/de/dhbw/contactdb/package-tree.html | 5 +- docs/de/dhbw/contactdb/package-use.html | 4 +- docs/de/dhbw/contactdb/utils/Parser.html | 4 +- .../contactdb/utils/class-use/Parser.html | 4 +- .../utils/class-use/db_new_entity.html | 4 +- .../dhbw/contactdb/utils/db_new_entity.html | 4 +- .../dhbw/contactdb/utils/package-summary.html | 4 +- .../de/dhbw/contactdb/utils/package-tree.html | 4 +- docs/de/dhbw/contactdb/utils/package-use.html | 4 +- .../ProjectTest.html} | 168 +++++++++++------- .../class-use/ProjectTest.html} | 14 +- docs/de/dhbw/unit/package-summary.html | 78 ++++++++ docs/de/dhbw/unit/package-tree.html | 75 ++++++++ docs/de/dhbw/unit/package-use.html | 61 +++++++ docs/element-list | 1 + docs/help-doc.html | 8 +- docs/index-files/index-1.html | 8 +- docs/index-files/index-10.html | 40 +++-- docs/index-files/index-11.html | 45 ++--- docs/index-files/index-12.html | 45 +++-- docs/index-files/index-13.html | 84 --------- docs/index-files/index-2.html | 24 +-- docs/index-files/index-3.html | 26 ++- docs/index-files/index-4.html | 42 +---- docs/index-files/index-5.html | 48 +++-- docs/index-files/index-6.html | 34 ++-- docs/index-files/index-7.html | 29 ++- docs/index-files/index-8.html | 72 ++------ docs/index-files/index-9.html | 88 ++++++--- docs/index.html | 6 +- docs/member-search-index.js | 2 +- docs/overview-summary.html | 4 +- docs/overview-tree.html | 9 +- docs/package-search-index.js | 2 +- docs/tag-search-index.js | 2 +- docs/type-search-index.js | 2 +- src/de/dhbw/contactdb/Main.java | 2 + .../{ => ProjectTest}/ProjektTester.java | 2 +- src/de/dhbw/unit/ProjectTest.java | 30 ++++ 52 files changed, 726 insertions(+), 570 deletions(-) create mode 100755 create_javadoc.sh delete mode 100644 docs/constant-values.html rename docs/de/dhbw/{contactdb/ProjektTester.html => unit/ProjectTest.html} (57%) rename docs/de/dhbw/{contactdb/class-use/ProjektTester.html => unit/class-use/ProjectTest.html} (80%) create mode 100644 docs/de/dhbw/unit/package-summary.html create mode 100644 docs/de/dhbw/unit/package-tree.html create mode 100644 docs/de/dhbw/unit/package-use.html delete mode 100644 docs/index-files/index-13.html rename src/de/dhbw/contactdb/{ => ProjectTest}/ProjektTester.java (99%) diff --git a/create_javadoc.sh b/create_javadoc.sh new file mode 100755 index 0000000..3944a5f --- /dev/null +++ b/create_javadoc.sh @@ -0,0 +1 @@ +/home/florian/.jdks/openjdk-16.0.2/bin/javadoc -locale de -private -splitindex -use -author -version -exclude de.dhbw.contactdb.ProjectTest -d /home/florian/Dokumente/Programmieren/IntelliJIDEAProjects/Programmieren-2-Kontaktdatenbank/docs -classpath "/home/florian/Dokumente/Programmieren/IntelliJIDEAProjects/Programmieren-2-Kontaktdatenbank:/home/florian/Dokumente/Programmieren/IntelliJIDEAProjects/Programmieren-2-Kontaktdatenbank/src:/home/florian/.m2/repository/org/junit/jupiter/junit-jupiter/5.7.0/junit-jupiter-5.7.0.jar:/home/florian/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.7.0/junit-jupiter-api-5.7.0.jar:/home/florian/.m2/repository/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar:/home/florian/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/home/florian/.m2/repository/org/junit/platform/junit-platform-commons/1.7.0/junit-platform-commons-1.7.0.jar:/home/florian/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.7.0/junit-jupiter-params-5.7.0.jar:/home/florian/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.7.0/junit-jupiter-engine-5.7.0.jar:/home/florian/.m2/repository/org/junit/platform/junit-platform-engine/1.7.0/junit-platform-engine-1.7.0.jar" "/home/florian/Dokumente/Programmieren/IntelliJIDEAProjects/Programmieren-2-Kontaktdatenbank/src/de/dhbw/contactdb/utils/Parser.java" "/home/florian/Dokumente/Programmieren/IntelliJIDEAProjects/Programmieren-2-Kontaktdatenbank/src/de/dhbw/contactdb/Main.java" "/home/florian/Dokumente/Programmieren/IntelliJIDEAProjects/Programmieren-2-Kontaktdatenbank/src/de/dhbw/contactdb/utils/db_new_entity.java" "/home/florian/Dokumente/Programmieren/IntelliJIDEAProjects/Programmieren-2-Kontaktdatenbank/src/de/dhbw/contactdb/Place.java" "/home/florian/Dokumente/Programmieren/IntelliJIDEAProjects/Programmieren-2-Kontaktdatenbank/src/de/dhbw/unit/ProjectTest.java" "/home/florian/Dokumente/Programmieren/IntelliJIDEAProjects/Programmieren-2-Kontaktdatenbank/src/de/dhbw/contactdb/Person.java" "/home/florian/Dokumente/Programmieren/IntelliJIDEAProjects/Programmieren-2-Kontaktdatenbank/src/de/dhbw/contactdb/Visit.java" \ No newline at end of file diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index 91428cb..3544b4f 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -2,11 +2,11 @@ - + All Classes - + @@ -84,8 +84,10 @@ loadScripts(document, 'script');
Main class
-
ProjektTester
-
 
+
ProjectTest
+
+
Tests
+
Visit
Main class
diff --git a/docs/allpackages-index.html b/docs/allpackages-index.html index b4ab685..328640a 100644 --- a/docs/allpackages-index.html +++ b/docs/allpackages-index.html @@ -2,11 +2,11 @@ - + All Packages - + @@ -62,6 +62,8 @@ loadScripts(document, 'script');
 
 
+ +
 
diff --git a/docs/constant-values.html b/docs/constant-values.html deleted file mode 100644 index ec94766..0000000 --- a/docs/constant-values.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - -Constant Field Values - - - - - - - - - - - - - - - -
- -
-
-
-

Constant Field Values

-
-

Contents

- -
-
-
-

de.dhbw.*

-
    -
  • -
    de.dhbw.contactdb.ProjektTester
    -
    -
    Modifier and Type
    -
    Constant Field
    -
    Value
    -
    private static final String
    - -
    "de.dhbw.contactdb.Main"
    -
    -
  • -
-
-
-
-
- - diff --git a/docs/de/dhbw/contactdb/Main.html b/docs/de/dhbw/contactdb/Main.html index 40bd1d9..a226ad9 100644 --- a/docs/de/dhbw/contactdb/Main.html +++ b/docs/de/dhbw/contactdb/Main.html @@ -2,11 +2,11 @@ - + Main - + @@ -168,16 +168,22 @@ loadScripts(document, 'script');
static void
main​(String[] args)
-
Main function
+
Main function + Parse commandline parameters
static void
-
searchForPerson​(String search)
+
parseArguments​(String args)
+
Parse commandline arguments and run specific functions after
+
+
static String
+
searchForPerson​(String search)
+
Searches the HashMap persons for a specific string
-
static void
-
searchForPlace​(String search)
-
+
static String
+ +
Searches the HashMap places for a specific string
@@ -256,7 +262,8 @@ loadScripts(document, 'script');

main

public static void main(String[] args)
-
Main function
+
Main function + Parse commandline parameters
Parameters:
args - String that contains program arguments
@@ -273,22 +280,26 @@ loadScripts(document, 'script');
  • searchForPlace

    -
    public static void searchForPlace(String search)
    +
    public static String searchForPlace(String search)
    Searches the HashMap places for a specific string
    Parameters:
    search - String that contains search value
    +
    Returns:
    +
    String with space-separated places
  • searchForPerson

    -
    public static void searchForPerson(String search)
    +
    public static String searchForPerson(String search)
    Searches the HashMap persons for a specific string
    Parameters:
    search - String that contains search value
    +
    Returns:
    +
    String with space-separated persons
  • @@ -334,6 +345,17 @@ loadScripts(document, 'script');
    +
  • +
    +

    parseArguments

    +
    public static void parseArguments(String args)
    +
    Parse commandline arguments and run specific functions after
    +
    +
    Parameters:
    +
    args - Commandline arguments
    +
    +
    +
  • diff --git a/docs/de/dhbw/contactdb/Person.html b/docs/de/dhbw/contactdb/Person.html index 7861ee5..2485e3a 100644 --- a/docs/de/dhbw/contactdb/Person.html +++ b/docs/de/dhbw/contactdb/Person.html @@ -2,11 +2,11 @@ - + Person - + diff --git a/docs/de/dhbw/contactdb/Place.html b/docs/de/dhbw/contactdb/Place.html index 0d45201..108f9ff 100644 --- a/docs/de/dhbw/contactdb/Place.html +++ b/docs/de/dhbw/contactdb/Place.html @@ -2,11 +2,11 @@ - + Place - + @@ -185,6 +185,13 @@ loadScripts(document, 'script');

    Field Details

    diff --git a/docs/de/dhbw/contactdb/Visit.html b/docs/de/dhbw/contactdb/Visit.html index 6d5cb2f..285960d 100644 --- a/docs/de/dhbw/contactdb/Visit.html +++ b/docs/de/dhbw/contactdb/Visit.html @@ -2,11 +2,11 @@ - + Visit - + @@ -204,6 +204,13 @@ loadScripts(document, 'script');

    Field Details

    diff --git a/docs/de/dhbw/contactdb/class-use/Main.html b/docs/de/dhbw/contactdb/class-use/Main.html index 2fabe94..e2f8162 100644 --- a/docs/de/dhbw/contactdb/class-use/Main.html +++ b/docs/de/dhbw/contactdb/class-use/Main.html @@ -2,11 +2,11 @@ - + Uses of Class de.dhbw.contactdb.Main - + diff --git a/docs/de/dhbw/contactdb/class-use/Person.html b/docs/de/dhbw/contactdb/class-use/Person.html index bad4679..fb30283 100644 --- a/docs/de/dhbw/contactdb/class-use/Person.html +++ b/docs/de/dhbw/contactdb/class-use/Person.html @@ -2,11 +2,11 @@ - + Uses of Class de.dhbw.contactdb.Person - + diff --git a/docs/de/dhbw/contactdb/class-use/Place.html b/docs/de/dhbw/contactdb/class-use/Place.html index 364d8df..931687c 100644 --- a/docs/de/dhbw/contactdb/class-use/Place.html +++ b/docs/de/dhbw/contactdb/class-use/Place.html @@ -2,11 +2,11 @@ - + Uses of Class de.dhbw.contactdb.Place - + diff --git a/docs/de/dhbw/contactdb/class-use/Visit.html b/docs/de/dhbw/contactdb/class-use/Visit.html index 9387b06..504a77b 100644 --- a/docs/de/dhbw/contactdb/class-use/Visit.html +++ b/docs/de/dhbw/contactdb/class-use/Visit.html @@ -2,11 +2,11 @@ - + Uses of Class de.dhbw.contactdb.Visit - + diff --git a/docs/de/dhbw/contactdb/package-summary.html b/docs/de/dhbw/contactdb/package-summary.html index e732e52..b88a31f 100644 --- a/docs/de/dhbw/contactdb/package-summary.html +++ b/docs/de/dhbw/contactdb/package-summary.html @@ -2,11 +2,11 @@ - + de.dhbw.contactdb - + @@ -75,10 +75,8 @@ loadScripts(document, 'script');
    Main class
    -
    ProjektTester
    -
     
    -
    Visit
    -
    + +
    Main class
    diff --git a/docs/de/dhbw/contactdb/package-tree.html b/docs/de/dhbw/contactdb/package-tree.html index d6564a7..70e82c6 100644 --- a/docs/de/dhbw/contactdb/package-tree.html +++ b/docs/de/dhbw/contactdb/package-tree.html @@ -2,11 +2,11 @@ - + de.dhbw.contactdb Class Hierarchy - + @@ -66,7 +66,6 @@ loadScripts(document, 'script');
  • de.dhbw.contactdb.Main
  • de.dhbw.contactdb.Person
  • de.dhbw.contactdb.Place
  • -
  • de.dhbw.contactdb.ProjektTester
  • de.dhbw.contactdb.Visit
  • diff --git a/docs/de/dhbw/contactdb/package-use.html b/docs/de/dhbw/contactdb/package-use.html index cc17ede..ffad9ca 100644 --- a/docs/de/dhbw/contactdb/package-use.html +++ b/docs/de/dhbw/contactdb/package-use.html @@ -2,11 +2,11 @@ - + Uses of Package de.dhbw.contactdb - + diff --git a/docs/de/dhbw/contactdb/utils/Parser.html b/docs/de/dhbw/contactdb/utils/Parser.html index b114b81..cebc8b8 100644 --- a/docs/de/dhbw/contactdb/utils/Parser.html +++ b/docs/de/dhbw/contactdb/utils/Parser.html @@ -2,11 +2,11 @@ - + Parser - + diff --git a/docs/de/dhbw/contactdb/utils/class-use/Parser.html b/docs/de/dhbw/contactdb/utils/class-use/Parser.html index 3b98570..7b4f336 100644 --- a/docs/de/dhbw/contactdb/utils/class-use/Parser.html +++ b/docs/de/dhbw/contactdb/utils/class-use/Parser.html @@ -2,11 +2,11 @@ - + Uses of Class de.dhbw.contactdb.utils.Parser - + diff --git a/docs/de/dhbw/contactdb/utils/class-use/db_new_entity.html b/docs/de/dhbw/contactdb/utils/class-use/db_new_entity.html index d5be85b..ef92ee5 100644 --- a/docs/de/dhbw/contactdb/utils/class-use/db_new_entity.html +++ b/docs/de/dhbw/contactdb/utils/class-use/db_new_entity.html @@ -2,11 +2,11 @@ - + Uses of Enum Class de.dhbw.contactdb.utils.db_new_entity - + diff --git a/docs/de/dhbw/contactdb/utils/db_new_entity.html b/docs/de/dhbw/contactdb/utils/db_new_entity.html index fe90fef..ffe1cfc 100644 --- a/docs/de/dhbw/contactdb/utils/db_new_entity.html +++ b/docs/de/dhbw/contactdb/utils/db_new_entity.html @@ -2,11 +2,11 @@ - + db_new_entity - + diff --git a/docs/de/dhbw/contactdb/utils/package-summary.html b/docs/de/dhbw/contactdb/utils/package-summary.html index 00d806c..e2f9955 100644 --- a/docs/de/dhbw/contactdb/utils/package-summary.html +++ b/docs/de/dhbw/contactdb/utils/package-summary.html @@ -2,11 +2,11 @@ - + de.dhbw.contactdb.utils - + diff --git a/docs/de/dhbw/contactdb/utils/package-tree.html b/docs/de/dhbw/contactdb/utils/package-tree.html index d09d2cc..e794b3c 100644 --- a/docs/de/dhbw/contactdb/utils/package-tree.html +++ b/docs/de/dhbw/contactdb/utils/package-tree.html @@ -2,11 +2,11 @@ - + de.dhbw.contactdb.utils Class Hierarchy - + diff --git a/docs/de/dhbw/contactdb/utils/package-use.html b/docs/de/dhbw/contactdb/utils/package-use.html index fba6f75..c34ca6e 100644 --- a/docs/de/dhbw/contactdb/utils/package-use.html +++ b/docs/de/dhbw/contactdb/utils/package-use.html @@ -2,11 +2,11 @@ - + Uses of Package de.dhbw.contactdb.utils - + diff --git a/docs/de/dhbw/contactdb/ProjektTester.html b/docs/de/dhbw/unit/ProjectTest.html similarity index 57% rename from docs/de/dhbw/contactdb/ProjektTester.html rename to docs/de/dhbw/unit/ProjectTest.html index 059b9f2..0ef3530 100644 --- a/docs/de/dhbw/contactdb/ProjektTester.html +++ b/docs/de/dhbw/unit/ProjectTest.html @@ -2,12 +2,12 @@ - -ProjektTester + +ProjectTest - - + + @@ -36,7 +36,7 @@ loadScripts(document, 'script');
  • Overview
  • Package
  • -
  • Use
  • +
  • Use
  • Tree
  • Index
  • Help
  • @@ -47,13 +47,13 @@ loadScripts(document, 'script'); @@ -72,34 +72,20 @@ loadScripts(document, 'script');
    - -

    Class ProjektTester

    +
    Package de.dhbw.unit
    +

    Class ProjectTest

    java.lang.Object -
    de.dhbw.contactdb.ProjektTester
    +
    de.dhbw.unit.ProjectTest

    -
    public class ProjektTester +
    public class ProjectTest extends Object
    +
    Tests
      - -
    • -
      -

      Field Summary

      -
      Fields
      -
      -
      Modifier and Type
      -
      Field
      -
      Description
      -
      private static String
      - -
       
      -
      -
      -
    • @@ -108,7 +94,7 @@ loadScripts(document, 'script');
      Constructor
      Description
      - +
       
      @@ -118,20 +104,46 @@ loadScripts(document, 'script');

      Method Summary

      -
      +
      Modifier and Type
      Method
      Description
      static void
      -
      main​(String[] args)
      -
       
      -
      private static boolean
      -
      passedTestNetzwerk​(String arg, - String resultString)
      -
      -
      Ueberprueft ob Aufruf den erwarteten Ausgabestring beinhaltet.
      + +
      +
      Parse database before testing
      +
      +
      void
      + +
      +
      Test #3
      +
      +
      void
      + +
      +
      Test #6
      +
      +
      void
      + +
      +
      Test #5
      +
      +
      void
      + +
      +
      Test #1
      +
      +
      void
      + +
      +
      Test #2
      +
      +
      void
      + +
      +
      Test #4
      @@ -145,24 +157,6 @@ loadScripts(document, 'script');
        - -
      • -
        -

        Field Details

        - -
        -
      • @@ -170,8 +164,8 @@ loadScripts(document, 'script');
        • -

          ProjektTester

          -
          public ProjektTester()
          +

          ProjectTest

          +
          public ProjectTest()
        @@ -183,23 +177,59 @@ loadScripts(document, 'script');

        Method Details

        • -
          -

          main

          -
          public static void main(String[] args)
          +
          +

          before

          +
          @BeforeAll +public static void before()
          +
          Parse database before testing
        • -
          -

          passedTestNetzwerk

          -
          private static boolean passedTestNetzwerk(String arg, - String resultString)
          -
          Ueberprueft ob Aufruf den erwarteten Ausgabestring beinhaltet.
          -
          -
          Parameters:
          -
          arg - Programmargument
          -
          resultString - String, welcher als Ausgabe erwartet wird
          -
          Returns:
          -
          +
          +

          testSearchPerson

          +
          @Test +public void testSearchPerson()
          +
          Test #1
          +
          +
        • +
        • +
          +

          testSearchPlace

          +
          @Test +public void testSearchPlace()
          +
          Test #2
          +
          +
        • +
        • +
          +

          testContactPersons

          +
          @Test +public void testContactPersons()
          +
          Test #3
          +
          +
        • +
        • +
          +

          testVisitors

          +
          @Test +public void testVisitors()
          +
          Test #4
          +
          +
        • +
        • +
          +

          testImport

          +
          @Test +public void testImport()
          +
          Test #5
          +
          +
        • +
        • +
          +

          testGetSearchString

          +
          @Test +public void testGetSearchString()
          +
          Test #6
        diff --git a/docs/de/dhbw/contactdb/class-use/ProjektTester.html b/docs/de/dhbw/unit/class-use/ProjectTest.html similarity index 80% rename from docs/de/dhbw/contactdb/class-use/ProjektTester.html rename to docs/de/dhbw/unit/class-use/ProjectTest.html index 657e301..fe1eff5 100644 --- a/docs/de/dhbw/contactdb/class-use/ProjektTester.html +++ b/docs/de/dhbw/unit/class-use/ProjectTest.html @@ -2,12 +2,12 @@ - -Uses of Class de.dhbw.contactdb.ProjektTester + +Uses of Class de.dhbw.unit.ProjectTest - - + + @@ -31,7 +31,7 @@ loadScripts(document, 'script');
    diff --git a/docs/de/dhbw/unit/package-summary.html b/docs/de/dhbw/unit/package-summary.html new file mode 100644 index 0000000..23ca694 --- /dev/null +++ b/docs/de/dhbw/unit/package-summary.html @@ -0,0 +1,78 @@ + + + + + +de.dhbw.unit + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Package de.dhbw.unit

    +
    +
    +
    package de.dhbw.unit
    +
    +
      +
    • +
      Class Summary
      +
      +
      Class
      +
      Description
      + +
      +
      Tests
      +
      +
      +
    • +
    +
    +
    +
    +
    + + diff --git a/docs/de/dhbw/unit/package-tree.html b/docs/de/dhbw/unit/package-tree.html new file mode 100644 index 0000000..db8af22 --- /dev/null +++ b/docs/de/dhbw/unit/package-tree.html @@ -0,0 +1,75 @@ + + + + + +de.dhbw.unit Class Hierarchy + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Hierarchy For Package de.dhbw.unit

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    + +
    +
    +
    +
    + + diff --git a/docs/de/dhbw/unit/package-use.html b/docs/de/dhbw/unit/package-use.html new file mode 100644 index 0000000..74e65f2 --- /dev/null +++ b/docs/de/dhbw/unit/package-use.html @@ -0,0 +1,61 @@ + + + + + +Uses of Package de.dhbw.unit + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Uses of Package
    de.dhbw.unit

    +
    +No usage of de.dhbw.unit
    +
    +
    + + diff --git a/docs/element-list b/docs/element-list index 0adb45d..3c7e2e4 100644 --- a/docs/element-list +++ b/docs/element-list @@ -1,2 +1,3 @@ de.dhbw.contactdb de.dhbw.contactdb.utils +de.dhbw.unit diff --git a/docs/help-doc.html b/docs/help-doc.html index c1e83db..07b23e6 100644 --- a/docs/help-doc.html +++ b/docs/help-doc.html @@ -2,11 +2,11 @@ - + API Help - + @@ -137,10 +137,6 @@ loadScripts(document, 'script');

    The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.

    -

    Constant Field Values

    -

    The Constant Field Values page lists the static final fields and their values.

    -
    -

    Search

    You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camel-case" abbreviations. For example:

    diff --git a/docs/package-search-index.js b/docs/package-search-index.js index 3707196..0b28bb4 100644 --- a/docs/package-search-index.js +++ b/docs/package-search-index.js @@ -1 +1 @@ -packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"de.dhbw.contactdb"},{"l":"de.dhbw.contactdb.utils"}];updateSearchResults(); \ No newline at end of file +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"de.dhbw.contactdb"},{"l":"de.dhbw.contactdb.utils"},{"l":"de.dhbw.unit"}];updateSearchResults(); \ No newline at end of file diff --git a/docs/tag-search-index.js b/docs/tag-search-index.js index f2a440c..0367dae 100644 --- a/docs/tag-search-index.js +++ b/docs/tag-search-index.js @@ -1 +1 @@ -tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"}];updateSearchResults(); \ No newline at end of file +tagSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/docs/type-search-index.js b/docs/type-search-index.js index fc3c020..c0e5fcf 100644 --- a/docs/type-search-index.js +++ b/docs/type-search-index.js @@ -1 +1 @@ -typeSearchIndex = [{"l":"All Classes","u":"allclasses-index.html"},{"p":"de.dhbw.contactdb.utils","l":"db_new_entity"},{"p":"de.dhbw.contactdb","l":"Main"},{"p":"de.dhbw.contactdb.utils","l":"Parser"},{"p":"de.dhbw.contactdb","l":"Person"},{"p":"de.dhbw.contactdb","l":"Place"},{"p":"de.dhbw.contactdb","l":"ProjektTester"},{"p":"de.dhbw.contactdb","l":"Visit"}];updateSearchResults(); \ No newline at end of file +typeSearchIndex = [{"l":"All Classes","u":"allclasses-index.html"},{"p":"de.dhbw.contactdb.utils","l":"db_new_entity"},{"p":"de.dhbw.contactdb","l":"Main"},{"p":"de.dhbw.contactdb.utils","l":"Parser"},{"p":"de.dhbw.contactdb","l":"Person"},{"p":"de.dhbw.contactdb","l":"Place"},{"p":"de.dhbw.unit","l":"ProjectTest"},{"p":"de.dhbw.contactdb","l":"Visit"}];updateSearchResults(); \ No newline at end of file diff --git a/src/de/dhbw/contactdb/Main.java b/src/de/dhbw/contactdb/Main.java index bb9450b..9ef5339 100644 --- a/src/de/dhbw/contactdb/Main.java +++ b/src/de/dhbw/contactdb/Main.java @@ -76,6 +76,7 @@ public class Main { * * @param search String that contains search value * @author florian kaiser + * @return String with space-separated places */ public static String searchForPlace(String search) { StringBuilder result = new StringBuilder(); @@ -93,6 +94,7 @@ public class Main { * * @param search String that contains search value * @author florian kaiser + * @return String with space-separated persons */ public static String searchForPerson(String search) { StringBuilder result = new StringBuilder(); diff --git a/src/de/dhbw/contactdb/ProjektTester.java b/src/de/dhbw/contactdb/ProjectTest/ProjektTester.java similarity index 99% rename from src/de/dhbw/contactdb/ProjektTester.java rename to src/de/dhbw/contactdb/ProjectTest/ProjektTester.java index f3ed617..1581184 100644 --- a/src/de/dhbw/contactdb/ProjektTester.java +++ b/src/de/dhbw/contactdb/ProjectTest/ProjektTester.java @@ -1,4 +1,4 @@ -package de.dhbw.contactdb; +package de.dhbw.contactdb.ProjectTest; import java.io.ByteArrayOutputStream; import java.io.PrintStream; diff --git a/src/de/dhbw/unit/ProjectTest.java b/src/de/dhbw/unit/ProjectTest.java index 1d21180..0433bb0 100644 --- a/src/de/dhbw/unit/ProjectTest.java +++ b/src/de/dhbw/unit/ProjectTest.java @@ -10,22 +10,40 @@ import java.util.stream.Collectors; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +/** + * Tests + */ public class ProjectTest { + /** + * Parse database before testing + */ @BeforeAll public static void before() { Parser.parse("/de/dhbw/contactdb/db/contacts2021.db"); } + + /** + * Test #1 + */ @Test public void testSearchPerson() { assertEquals("Mila Milan ", Main.searchForPerson("ila")); } + + /** + * Test #2 + */ @Test public void testSearchPlace() { assertEquals("Supermarkt Großmarkt ", Main.searchForPlace("markt")); } + + /** + * Test #3 + */ @Test public void testContactPersons() { assertEquals("Ben, Carla, Emilia, Emily, Joshua, Malia, Maria, Mia, Sophia", Main.getContactPersons(158).stream() @@ -36,6 +54,10 @@ public class ProjectTest { .collect(Collectors.joining(", "))); } + + /** + * Test #4 + */ @Test public void testVisitors() { assertEquals("Anna, Charlotte, Emilia, Leonie, Marie, Mia", Main.getVisitors("3,\"2021-05-15t11:00:00\"").stream() @@ -45,11 +67,19 @@ public class ProjectTest { .collect(Collectors.joining(", "))); } + + /** + * Test #5 + */ @Test public void testImport() { assertNotNull(Main.class.getResourceAsStream("/de/dhbw/contactdb/db/contacts2021.db")); } + + /** + * Test #6 + */ @Test public void testGetSearchString() { assertEquals("3,2021-05-15t11:00:00", Main.getSearchString("=3,\"2021-05-15T11:00:00\""));