first commit
This commit is contained in:
commit
eb320600e1
17
.idea/compiler.xml
Normal file
17
.idea/compiler.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="USE_RELEASE_OPTION" value="false" />
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="untitled1" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel target="11">
|
||||
<module name="untitled1" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
1
.idea/description.html
Normal file
1
.idea/description.html
Normal file
@ -0,0 +1 @@
|
||||
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
|
6
.idea/encodings.xml
Normal file
6
.idea/encodings.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
13
.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml
Normal file
13
.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: aopalliance:aopalliance:1.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/aopalliance/aopalliance/1.0/aopalliance-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/aopalliance/aopalliance/1.0/aopalliance-1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
13
.idea/libraries/Maven__com_beust_jcommander_1_72.xml
Normal file
13
.idea/libraries/Maven__com_beust_jcommander_1_72.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.beust:jcommander:1.72">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/beust/jcommander/1.72/jcommander-1.72.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/beust/jcommander/1.72/jcommander-1.72-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/beust/jcommander/1.72/jcommander-1.72-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
13
.idea/libraries/Maven__com_google_guava_guava_19_0.xml
Normal file
13
.idea/libraries/Maven__com_google_guava_guava_19_0.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.guava:guava:19.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/19.0/guava-19.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/19.0/guava-19.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/19.0/guava-19.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.inject:guice:no_aop:4.1.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/inject/guice/4.1.0/guice-4.1.0-no_aop.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/inject/guice/4.1.0/guice-4.1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/inject/guice/4.1.0/guice-4.1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
13
.idea/libraries/Maven__javax_inject_javax_inject_1.xml
Normal file
13
.idea/libraries/Maven__javax_inject_javax_inject_1.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: javax.inject:javax.inject:1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/inject/javax.inject/1/javax.inject-1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/inject/javax.inject/1/javax.inject-1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/inject/javax.inject/1/javax.inject-1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
13
.idea/libraries/Maven__junit_junit_4_13.xml
Normal file
13
.idea/libraries/Maven__junit_junit_4_13.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: junit:junit:4.13">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13/junit-4.13.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13/junit-4.13-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13/junit-4.13-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
13
.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
Normal file
13
.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.hamcrest:hamcrest-core:1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
13
.idea/libraries/Maven__org_testng_testng_7_1_0.xml
Normal file
13
.idea/libraries/Maven__org_testng_testng_7_1_0.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.testng:testng:7.1.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/testng/testng/7.1.0/testng-7.1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/testng/testng/7.1.0/testng-7.1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/testng/testng/7.1.0/testng-7.1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
13
.idea/libraries/Maven__org_yaml_snakeyaml_1_21.xml
Normal file
13
.idea/libraries/Maven__org_yaml_snakeyaml_1_21.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.yaml:snakeyaml:1.21">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.21/snakeyaml-1.21.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.21/snakeyaml-1.21-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.21/snakeyaml-1.21-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
21
.idea/misc.xml
Normal file
21
.idea/misc.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EntryPointsManager">
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.junit.Test" />
|
||||
</list>
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectKey">
|
||||
<option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/untitled1.iml" filepath="$PROJECT_DIR$/untitled1.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
3
.idea/project-template.xml
Normal file
3
.idea/project-template.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<input-field default="com.company">IJ_BASE_PACKAGE</input-field>
|
||||
</template>
|
124
.idea/uiDesigner.xml
Normal file
124
.idea/uiDesigner.xml
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
305
.idea/workspace.xml
Normal file
305
.idea/workspace.xml
Normal file
@ -0,0 +1,305 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="493f917a-39b6-4dd0-a05c-a8b1b022f7cf" name="Default Changelist" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="Class" />
|
||||
<option value="JUnit5 Test Class" />
|
||||
<option value="AnnotationType" />
|
||||
<option value="JUnit4 Test Class" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectId" id="1aJmZXOK28iEwp5gTEDZAZCH3r0" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showExcludedFiles" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="Downloaded.Files.Path.Enabled" value="false" />
|
||||
<property name="Repository.Attach.Annotations" value="false" />
|
||||
<property name="Repository.Attach.JavaDocs" value="false" />
|
||||
<property name="Repository.Attach.Sources" value="false" />
|
||||
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
|
||||
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit4" value="" />
|
||||
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit5" value="" />
|
||||
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.includeInheritedMembers" value="true" />
|
||||
<property name="create.test.in.the.same.root" value="true" />
|
||||
<property name="last_directory_selection" value="$PROJECT_DIR$/src/test/java" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="project.structure.last.edited" value="Modules" />
|
||||
<property name="project.structure.proportion" value="0.15" />
|
||||
<property name="project.structure.side.proportion" value="0.2" />
|
||||
<property name="settings.editor.selected.configurable" value="reference.projectsettings.compiler.javacompiler" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CreateTestDialog.RecentsKey">
|
||||
<recent name="main.java.com.company" />
|
||||
<recent name="com.company" />
|
||||
</key>
|
||||
<key name="CopyClassDialog.RECENTS_KEY">
|
||||
<recent name="main.java.com.company" />
|
||||
</key>
|
||||
<key name="CreateTestDialog.Recents.Supers">
|
||||
<recent name="" />
|
||||
</key>
|
||||
<key name="CreateClassDialog.RecentsKey">
|
||||
<recent name="test" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager" selected="JUnit.CheckPeselTest">
|
||||
<configuration type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||
<module name="untitled1" />
|
||||
<useClassPathOnly />
|
||||
<option name="PACKAGE_NAME" value="" />
|
||||
<option name="MAIN_CLASS_NAME" value="" />
|
||||
<option name="METHOD_NAME" value="" />
|
||||
<option name="TEST_OBJECT" value="class" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||
<module name="untitled1" />
|
||||
<useClassPathOnly />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="com.company.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="PACKAGE_NAME" value="com.company" />
|
||||
<option name="MAIN_CLASS_NAME" value="" />
|
||||
<option name="METHOD_NAME" value="" />
|
||||
<option name="TEST_OBJECT" value="class" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="com.company.Main" />
|
||||
<module name="untitled1" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="com.company.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="CheckPersonTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||
<module name="untitled1" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="main.java.com.company.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="PACKAGE_NAME" value="main.java.com.company" />
|
||||
<option name="MAIN_CLASS_NAME" value="main.java.com.company.CheckPersonTest" />
|
||||
<option name="TEST_OBJECT" value="class" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="CheckPersonTest.checkPerson" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||
<module name="untitled1" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="main.java.com.company.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="PACKAGE_NAME" value="main.java.com.company" />
|
||||
<option name="MAIN_CLASS_NAME" value="main.java.com.company.CheckPersonTest" />
|
||||
<option name="METHOD_NAME" value="checkPerson" />
|
||||
<option name="TEST_OBJECT" value="method" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="CheckPeselTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||
<module name="untitled1" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="main.java.com.company.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="PACKAGE_NAME" value="main.java.com.company" />
|
||||
<option name="MAIN_CLASS_NAME" value="main.java.com.company.CheckPeselTest" />
|
||||
<option name="TEST_OBJECT" value="class" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="CheckPeselTest.check" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||
<module name="untitled1" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="main.java.com.company.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="PACKAGE_NAME" value="main.java.com.company" />
|
||||
<option name="MAIN_CLASS_NAME" value="main.java.com.company.CheckPeselTest" />
|
||||
<option name="METHOD_NAME" value="check" />
|
||||
<option name="TEST_OBJECT" value="method" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="test" type="JUnit" factoryName="JUnit">
|
||||
<module name="untitled1" />
|
||||
<useClassPathOnly />
|
||||
<option name="MAIN_CLASS_NAME" value="" />
|
||||
<option name="METHOD_NAME" value="" />
|
||||
<option name="TEST_OBJECT" value="class" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<list>
|
||||
<item itemvalue="Application.Main" />
|
||||
<item itemvalue="JUnit.test" />
|
||||
<item itemvalue="JUnit.CheckPeselTest" />
|
||||
<item itemvalue="JUnit.CheckPeselTest.check" />
|
||||
<item itemvalue="JUnit.CheckPersonTest" />
|
||||
<item itemvalue="JUnit.CheckPersonTest.checkPerson" />
|
||||
</list>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="JUnit.CheckPeselTest" />
|
||||
<item itemvalue="JUnit.CheckPersonTest" />
|
||||
<item itemvalue="Application.Main" />
|
||||
<item itemvalue="JUnit.CheckPersonTest.checkPerson" />
|
||||
<item itemvalue="JUnit.CheckPeselTest.check" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="493f917a-39b6-4dd0-a05c-a8b1b022f7cf" name="Default Changelist" comment="" />
|
||||
<created>1586462127137</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1586462127137</updated>
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="2357" y="161" key="#com.company_in_untitled1" timestamp="1586628057338">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2357" y="161" key="#com.company_in_untitled1/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586628057338" />
|
||||
<state x="2214" y="185" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1586628298286">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2214" y="185" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586628298286" />
|
||||
<state x="2399" y="217" key="#com.intellij.ide.fileTemplates.ui.ConfigureTemplatesDialog" timestamp="1586628849505">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2399" y="217" key="#com.intellij.ide.fileTemplates.ui.ConfigureTemplatesDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586628849505" />
|
||||
<state x="2489" y="306" key="#com.intellij.ide.util.PackageChooserDialog" timestamp="1586628292127">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2489" y="306" key="#com.intellij.ide.util.PackageChooserDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586628292127" />
|
||||
<state x="2489" y="314" key="#com.intellij.ide.util.TreeClassChooserDialog" timestamp="1586625893318">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2489" y="314" key="#com.intellij.ide.util.TreeClassChooserDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586625893318" />
|
||||
<state x="2483" y="219" key="#com.intellij.ide.util.frameworkSupport.AddFrameworkSupportDialog" timestamp="1586462147180">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2483" y="219" key="#com.intellij.ide.util.frameworkSupport.AddFrameworkSupportDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586462147180" />
|
||||
<state x="2490" y="277" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1586628499495">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2490" y="277" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586628499495" />
|
||||
<state x="2540" y="285" key="FileChooserDialogImpl" timestamp="1586625909430">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2540" y="285" key="FileChooserDialogImpl/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586625909430" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.bottom" timestamp="1586801264174">
|
||||
<screen x="0" y="0" width="1680" height="1010" />
|
||||
</state>
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.bottom/-1920.-26.1920.1040/0.0.1680.1010@0.0.1680.1010" timestamp="1586801264174" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.bottom/-1920.0.1920.1040/0.0.1680.1010@0.0.1680.1010" timestamp="1586791897074" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.bottom/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586731480215" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.center" timestamp="1586801264174">
|
||||
<screen x="0" y="0" width="1680" height="1010" />
|
||||
</state>
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.center/-1920.-26.1920.1040/0.0.1680.1010@0.0.1680.1010" timestamp="1586801264174" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.center/-1920.0.1920.1040/0.0.1680.1010@0.0.1680.1010" timestamp="1586791897074" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.center/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586731480215" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.left" timestamp="1586801264174">
|
||||
<screen x="0" y="0" width="1680" height="1010" />
|
||||
</state>
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.left/-1920.-26.1920.1040/0.0.1680.1010@0.0.1680.1010" timestamp="1586801264174" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.left/-1920.0.1920.1040/0.0.1680.1010@0.0.1680.1010" timestamp="1586791897074" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.left/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586731480215" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.right" timestamp="1586801264174">
|
||||
<screen x="0" y="0" width="1680" height="1010" />
|
||||
</state>
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.right/-1920.-26.1920.1040/0.0.1680.1010@0.0.1680.1010" timestamp="1586801264174" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.right/-1920.0.1920.1040/0.0.1680.1010@0.0.1680.1010" timestamp="1586791897074" />
|
||||
<state width="1637" height="281" key="GridCell.Tab.0.right/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586731480215" />
|
||||
<state x="2290" y="185" key="Maven.ArtifactSearchDialog" timestamp="1586628682404">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2290" y="185" key="Maven.ArtifactSearchDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586628682404" />
|
||||
<state x="2261" y="172" key="SettingsEditor" timestamp="1586628908614">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2261" y="172" key="SettingsEditor/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586628908614" />
|
||||
<state x="2576" y="308" key="chooseDestDirectoryDialog" timestamp="1586629006426">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2576" y="308" key="chooseDestDirectoryDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586629006426" />
|
||||
<state x="536" y="329" key="com.intellij.ide.util.TipDialog" timestamp="1586801290954">
|
||||
<screen x="0" y="0" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="536" y="329" key="com.intellij.ide.util.TipDialog/-1920.-26.1920.1040/0.0.1680.1010@0.0.1680.1010" timestamp="1586801290954" />
|
||||
<state x="536" y="329" key="com.intellij.ide.util.TipDialog/-1920.0.1920.1040/0.0.1680.1010@0.0.1680.1010" timestamp="1586779266987" />
|
||||
<state x="2456" y="354" key="com.intellij.ide.util.TipDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586711947474" />
|
||||
<state x="2464" y="423" key="com.intellij.jarRepository.RepositoryAttachDialog-DOWNLOAD" timestamp="1586462490924">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2464" y="423" key="com.intellij.jarRepository.RepositoryAttachDialog-DOWNLOAD/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586462490924" />
|
||||
<state x="2531" y="233" key="com.intellij.testIntegration.createTest.CreateTestDialog" timestamp="1586629006446">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2531" y="233" key="com.intellij.testIntegration.createTest.CreateTestDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586629006446" />
|
||||
<state x="2490" y="285" key="extract.method.dialog" timestamp="1586718113192">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2490" y="285" key="extract.method.dialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586718113192" />
|
||||
<state x="2466" y="158" key="refactoring.ChangeSignatureDialog" timestamp="1586717394784">
|
||||
<screen x="1920" y="25" width="1680" height="1010" />
|
||||
</state>
|
||||
<state x="2466" y="158" key="refactoring.ChangeSignatureDialog/0.0.1920.1040/1920.25.1680.1010@1920.25.1680.1010" timestamp="1586717394784" />
|
||||
</component>
|
||||
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
||||
<SUITE FILE_PATH="coverage/untitled1$All_in_untitled1.ic" NAME="All in untitled1 Coverage Results" MODIFIED="1586628024903" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
|
||||
</component>
|
||||
</project>
|
1
filename.txt
Normal file
1
filename.txt
Normal file
@ -0,0 +1 @@
|
||||
j j j 95070511101
|
38
pom.xml
Normal file
38
pom.xml
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
<groupId>groupId</groupId>
|
||||
<artifactId>untitled1</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
41
src/main/java/com/company/AddToFile.java
Normal file
41
src/main/java/com/company/AddToFile.java
Normal file
@ -0,0 +1,41 @@
|
||||
package com.company;
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
|
||||
public class AddToFile {
|
||||
public File createNewFile() throws IOException {
|
||||
File file = new File("filename.txt");
|
||||
return file;
|
||||
}
|
||||
public void DeleteFile() {
|
||||
File myObj = new File("filename.txt");
|
||||
myObj.delete();
|
||||
}
|
||||
|
||||
public void addNewData(Person person, File file, List < String > listPesel) throws IOException {
|
||||
boolean searchList = listPesel.contains(person.pesel);
|
||||
if (searchList) {
|
||||
int indexList = listPesel.indexOf(person.pesel);
|
||||
Path path = Paths.get("filename.txt");
|
||||
List < String > lines = Files.readAllLines(path, StandardCharsets.UTF_8);
|
||||
lines.set(indexList, person.city + " " + person.name + " " + person.surname + " " + person.pesel);
|
||||
Files.write(path, lines, StandardCharsets.UTF_8);
|
||||
} else {
|
||||
try {
|
||||
FileWriter myWriter = new FileWriter(file, true);
|
||||
myWriter.write(person.city + " " + person.name + " " + person.surname + " " + person.pesel + "\n");
|
||||
myWriter.close();
|
||||
System.out.println("Dane dodano do bazy.");
|
||||
listPesel.add(person.pesel);
|
||||
} catch (IOException e) {
|
||||
System.out.println("Nastapił bład przy zapisie.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
21
src/main/java/com/company/CheckPesel.java
Normal file
21
src/main/java/com/company/CheckPesel.java
Normal file
@ -0,0 +1,21 @@
|
||||
package com.company;
|
||||
|
||||
public class CheckPesel {
|
||||
final char[] peselNumber;
|
||||
|
||||
public CheckPesel(String pesel) {
|
||||
peselNumber = pesel.toCharArray();
|
||||
}
|
||||
|
||||
public boolean check(String pesel){
|
||||
final char[] peselNumber = pesel.toCharArray();
|
||||
if(pesel.length()==11){
|
||||
final int sumaKontrolna = 9*Integer.parseInt(String.valueOf(peselNumber[0])) + 7*Integer.parseInt(String.valueOf(peselNumber[1])) + 3*Integer.parseInt(String.valueOf(peselNumber[2])) + 1*Integer.parseInt(String.valueOf(peselNumber[3])) + 9*Integer.parseInt(String.valueOf(peselNumber[4])) + 7*Integer.parseInt(String.valueOf(peselNumber[5])) + 3*Integer.parseInt(String.valueOf(peselNumber[6])) + 1*Integer.parseInt(String.valueOf(peselNumber[7])) + 9*Integer.parseInt(String.valueOf(peselNumber[8])) + 7*Integer.parseInt(String.valueOf(peselNumber[9]));
|
||||
if(sumaKontrolna%10!=Integer.parseInt(String.valueOf(peselNumber[10]))){
|
||||
return false;
|
||||
}else{return true;}
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
43
src/main/java/com/company/Main.java
Normal file
43
src/main/java/com/company/Main.java
Normal file
@ -0,0 +1,43 @@
|
||||
package com.company;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
int answer=1;
|
||||
List<String> listPesel = new ArrayList<>();
|
||||
|
||||
new AddToFile().DeleteFile();
|
||||
File fileName = new AddToFile().createNewFile();
|
||||
while (answer==1){
|
||||
final Scanner scan = new Scanner(System.in);
|
||||
System.out.println("Podaj miasto");
|
||||
final String city = scan.nextLine();
|
||||
System.out.println("Podaj imie");
|
||||
final String name = scan.nextLine();
|
||||
System.out.println("Podaj nazwisko");
|
||||
final String surname = scan.nextLine();
|
||||
System.out.println("Podaj PESEL");
|
||||
final String pesel = scan.nextLine();
|
||||
Person person = new Person(city, name, surname, pesel);
|
||||
CheckPesel chcek = new CheckPesel(pesel);
|
||||
if(chcek.check(pesel)==true && person.checkPerson()==true){
|
||||
new AddToFile().addNewData(person,fileName,listPesel);
|
||||
}else{
|
||||
System.out.println("Podano zły pesel lub nie podano wszytkich danych");
|
||||
}
|
||||
System.out.println("Wpisz 1, jeśli chcesz dopisać kolejną osobę lub jakąkolwiek inna cyfre, aby zakonczyć");
|
||||
answer = scan.nextInt();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
35
src/main/java/com/company/Person.java
Normal file
35
src/main/java/com/company/Person.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.company;
|
||||
|
||||
public class Person {
|
||||
String city;
|
||||
String name;
|
||||
String surname;
|
||||
public String pesel;
|
||||
|
||||
public Person(String city, String name, String surname, String pesel){
|
||||
this.city=city;
|
||||
this.name=name;
|
||||
this.surname=surname;
|
||||
this.pesel=pesel;
|
||||
}
|
||||
|
||||
public boolean checkPerson(){
|
||||
if(city.isEmpty() || name.isEmpty() || surname.isEmpty() || pesel.isEmpty()){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}}
|
||||
public String getPesel() {
|
||||
return pesel;
|
||||
}
|
||||
public String getName() { return name; }
|
||||
public String getSurname() {
|
||||
return surname;
|
||||
}
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
public String[] getPerson(){
|
||||
return new String[]{city, name, surname, pesel};
|
||||
}
|
||||
}
|
15
src/test/java/main/java/com/company/CheckPersonTest.java
Normal file
15
src/test/java/main/java/com/company/CheckPersonTest.java
Normal file
@ -0,0 +1,15 @@
|
||||
package main.java.com.company;
|
||||
import com.company.Person;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
public class CheckPersonTest {
|
||||
Person person = new Person("", "name", "surname", "950707");
|
||||
Person person2 = new Person("", "", "surname", "950707");
|
||||
|
||||
@Test
|
||||
public void checkPerson() {
|
||||
assertFalse(person.checkPerson());
|
||||
|
||||
assertFalse(person2.checkPerson());
|
||||
}
|
||||
}
|
18
src/test/java/main/java/com/company/CheckPeselTest.java
Normal file
18
src/test/java/main/java/com/company/CheckPeselTest.java
Normal file
@ -0,0 +1,18 @@
|
||||
package main.java.com.company;
|
||||
import com.company.CheckPesel;
|
||||
import com.company.Person;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
public class CheckPeselTest {
|
||||
|
||||
@Test
|
||||
public void checkPesel() {
|
||||
Person person = new Person("city", "name", "surname", "95070511123");
|
||||
Person person2 = new Person("city", "name", "surname", "950705");
|
||||
|
||||
CheckPesel chcek = new CheckPesel(person.pesel);
|
||||
assertFalse(chcek.check(person.pesel));
|
||||
assertFalse(chcek.check(person2.pesel));
|
||||
|
||||
}
|
||||
}
|
BIN
target/classes/com/company/AddToFile.class
Normal file
BIN
target/classes/com/company/AddToFile.class
Normal file
Binary file not shown.
BIN
target/classes/com/company/CheckPesel.class
Normal file
BIN
target/classes/com/company/CheckPesel.class
Normal file
Binary file not shown.
BIN
target/classes/com/company/Main.class
Normal file
BIN
target/classes/com/company/Main.class
Normal file
Binary file not shown.
BIN
target/classes/com/company/Person.class
Normal file
BIN
target/classes/com/company/Person.class
Normal file
Binary file not shown.
BIN
target/test-classes/main/java/com/company/CheckPersonTest.class
Normal file
BIN
target/test-classes/main/java/com/company/CheckPersonTest.class
Normal file
Binary file not shown.
BIN
target/test-classes/main/java/com/company/CheckPeselTest.class
Normal file
BIN
target/test-classes/main/java/com/company/CheckPeselTest.class
Normal file
Binary file not shown.
51
untitled1.iml
Normal file
51
untitled1.iml
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="JUnit4">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="JUnit5.4">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter/5.4.2/junit-jupiter-5.4.2.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.4.2/junit-jupiter-api-5.4.2.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.1.1/opentest4j-1.1.1.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.4.2/junit-platform-commons-1.4.2.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-params/5.4.2/junit-jupiter-params-5.4.2.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-engine/5.4.2/junit-jupiter-engine-5.4.2.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.4.2/junit-platform-engine-1.4.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:7.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.72" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.google.inject:guice:no_aop:4.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: javax.inject:javax.inject:1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: aopalliance:aopalliance:1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.google.guava:guava:19.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.21" level="project" />
|
||||
</component>
|
||||
</module>
|
Loading…
Reference in New Issue
Block a user