Commit f8dc6d0f authored by Gaetan's avatar Gaetan

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/test/java/garage/DieselEngineTest.java
#	src/test/java/garage/TestBenchTest.java
parents 291c423b 61c309ee
ProjetJava
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel>
<module name="geometry.main" target="1.8" />
<module name="geometry.test" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="geometry" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/garage/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" scope="TEST">
<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.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.5.0-M1/junit-jupiter-api-5.5.0-M1.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.5.0-M1/junit-platform-commons-1.5.0-M1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<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>
</component>
</module>
\ No newline at end of file
...@@ -3,9 +3,8 @@ ...@@ -3,9 +3,8 @@
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="distributionType" value="LOCAL" /> <option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="/usr/share/gradle" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="12" project-jdk-type="JavaSDK"> <component name="ExternalStorageConfigurationManager" enabled="true" />
<output url="file://$PROJECT_DIR$/classes" /> <component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/geometry.iml" filepath="$PROJECT_DIR$/.idea/geometry.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="geometry:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="geometry" external.system.module.type="sourceSet" external.system.module.version="1.0-SNAPSHOT" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/../../build/classes/java/main" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/main" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="geometry:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="geometry" external.system.module.type="sourceSet" external.system.module.version="1.0-SNAPSHOT" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output-test url="file://$MODULE_DIR$/../../build/classes/java/test" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/test" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="geometry.main" />
<orderEntry type="library" name="Gradle: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" />
</component>
<component name="TestModuleProperties" production-module="geometry.main" />
</module>
\ No newline at end of file
<?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>
\ No newline at end of file
...@@ -2,7 +2,6 @@ plugins { ...@@ -2,7 +2,6 @@ plugins {
id 'java' id 'java'
} }
group 'geometry'
version '1.0-SNAPSHOT' version '1.0-SNAPSHOT'
sourceCompatibility = 1.8 sourceCompatibility = 1.8
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/garage.iml" filepath="$PROJECT_DIR$/garage.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?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>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="geometry" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/tests" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" scope="TEST">
<library name="JUnit4">
<CLASSES>
<root url="jar://$USER_HOME$/.m2/repository/junit/junit/4.12/junit-4.12.jar!/" />
<root url="jar://$USER_HOME$/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
\ No newline at end of file
rootProject.name = 'geometry'
#Mon May 20 10:31:00 CEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectKey">
<option name="state" value="project://63537948-39a4-48a0-9c97-34259a0fa913" />
</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>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/openclassroom.iml" filepath="$PROJECT_DIR$/openclassroom.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="0faeadbc-d047-4802-8e58-72aee2d0c2b4" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<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="DefaultGradleProjectSettings">
<option name="isMigrated" value="true" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" selection-start-line="3" selection-end-line="3" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/test/TestStream.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="9" selection-start-line="6" selection-start-column="9" selection-end-line="6" selection-end-column="9" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Personne.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390">
<caret line="26" selection-start-line="26" selection-end-line="26" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Couleur.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="13" lean-forward="true" selection-start-line="13" selection-end-line="13" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/Personne.java" />
<option value="$PROJECT_DIR$/src/Couleur.java" />
<option value="$PROJECT_DIR$/src/Main.java" />
<option value="$PROJECT_DIR$/src/test/TestStream.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="21" />
<option name="y" value="45" />
<option name="width" value="1878" />
<option name="height" value="1014" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="openclassroom" type="b2602c69:ProjectViewProjectNode" />
<item name="openclassroom" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="openclassroom" type="b2602c69:ProjectViewProjectNode" />
<item name="openclassroom" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="openclassroom" type="b2602c69:ProjectViewProjectNode" />
<item name="openclassroom" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="test" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration name="Main" type="Application" factoryName="Application" temporary="true">
<option name="MAIN_CLASS_NAME" value="Main" />
<module name="openclassroom" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<recent_temporary>
<list>
<item itemvalue="Application.Main" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="0faeadbc-d047-4802-8e58-72aee2d0c2b4" name="Default Changelist" comment="" />
<created>1557148891393</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1557148891393</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="21" y="45" width="1878" height="1014" extended-state="0" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.12200436" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
<window_info id="UI Designer" order="4" />
<window_info id="Capture Tool" order="5" />
<window_info id="Favorites" order="6" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" weight="0.32890365" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Terminal" order="7" />
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Messages" order="10" visible="true" weight="0.32890365" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Palette" order="3" />
<window_info anchor="right" id="Maven" order="4" />
<window_info anchor="right" id="Theme Preview" order="5" />
<window_info anchor="right" id="Capture Analysis" order="6" />
<window_info anchor="right" id="Palette&#9;" order="7" />
</layout>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/Personne.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390">
<caret line="26" selection-start-line="26" selection-end-line="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Couleur.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="13" lean-forward="true" selection-start-line="13" selection-end-line="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" selection-start-line="3" selection-end-line="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/TestStream.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="9" selection-start-line="6" selection-start-column="9" selection-end-line="6" selection-end-column="9" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
public class Main {
public static void main(String[] args) {
}
}
rootProject.name = 'ProjetJava'
package garage; package garage.garage;
public class ExecutionFailedException extends Exception{ public class ExecutionFailedException extends Exception{
......
package garage; package garage.garage;
import vehicle.Vehicle;
import java.util.*; import garage.vehicle.Vehicle;
import java.util.LinkedList;
public class Garage { public class Garage {
......
package garage; package garage.garage;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.List; import java.util.List;
......
package garage; package garage.garage;
import vehicle.Vehicle;
import garage.vehicle.Vehicle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
......
package main; package garage.main;
import garage.*; import garage.garage.Garage;
import java.io.*; import garage.vehicle.Vehicle;
import java.util.*;
import vehicle.*;
import java.io.*;
import java.util.LinkedList;
public class Main { public class Main {
......
package vehicle; package garage.vehicle;
import vehicle.part.brake.Brake; import garage.vehicle.part.brake.Brake;
import vehicle.part.engine.Engine; import garage.vehicle.part.engine.Engine;
import vehicle.part.frame.Frame; import garage.vehicle.part.frame.Frame;
import vehicle.part.gearbox.GearBox; import garage.vehicle.part.gearbox.GearBox;
import vehicle.part.gearbox.GearBoxAutomatic; import garage.vehicle.part.gearbox.GearBoxAutomatic;
import vehicle.part.gearbox.GearBoxManual; import garage.vehicle.part.gearbox.GearBoxManual;
import vehicle.part.option.Option; import garage.vehicle.part.option.Option;
import vehicle.part.pedal.Pedal; import garage.vehicle.part.pedal.Pedal;
import vehicle.part.pedal.PedalAccelerator; import garage.vehicle.part.pedal.PedalAccelerator;
import vehicle.part.pedal.PedalBrake; import garage.vehicle.part.pedal.PedalBrake;
import vehicle.part.pedal.PedalClutch; import garage.vehicle.part.pedal.PedalClutch;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
......
package vehicle; package garage.vehicle;
public enum VehicleBrand { public enum VehicleBrand {
......
package vehicle; package garage.vehicle;
import vehicle.part.brake.BrakeType; import garage.vehicle.part.brake.BrakeType;
import vehicle.part.engine.EngineModel; import garage.vehicle.part.engine.EngineModel;
import vehicle.part.frame.FrameType; import garage.vehicle.part.frame.FrameType;
public enum VehicleModel { public enum VehicleModel {
......
package vehicle.part.brake; package garage.vehicle.part.brake;
public class Brake{ public class Brake{
......
package vehicle.part.brake; package garage.vehicle.part.brake;
public enum BrakeType { public enum BrakeType {
......
package vehicle.part.door; package garage.vehicle.part.door;
public class Door { public class Door {
......
package vehicle.part.door; package garage.vehicle.part.door;
public class Window { public class Window {
} }
package vehicle.part.engine; package garage.vehicle.part.engine;
public class DieselEngine extends Engine{ public class DieselEngine extends Engine{
......
package vehicle.part.engine; package garage.vehicle.part.engine;
public class ElectricEngine extends Engine { public class ElectricEngine extends Engine {
......
package vehicle.part.engine; package garage.vehicle.part.engine;
public class Engine { public class Engine {
......
package vehicle.part.engine; package garage.vehicle.part.engine;
public class EngineBrokenException extends Exception { public class EngineBrokenException extends Exception {
......
package vehicle.part.engine; package garage.vehicle.part.engine;
import vehicle.part.gearbox.Gear; import garage.vehicle.part.gearbox.Gear;
public enum EngineModel { public enum EngineModel {
......
package vehicle.part.engine; package garage.vehicle.part.engine;
public enum EngineType { public enum EngineType {
......
package vehicle.part.engine; package garage.vehicle.part.engine;
public class HybridEngine extends Engine { public class HybridEngine extends Engine {
......
package vehicle.part.engine; package garage.vehicle.part.engine;
public class PetrolEngine extends Engine { public class PetrolEngine extends Engine {
......
package vehicle.part.frame; package garage.vehicle.part.frame;
import vehicle.part.door.Door; import garage.vehicle.part.door.Door;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
......
package vehicle.part.frame; package garage.vehicle.part.frame;
public enum FrameType { public enum FrameType {
......
package vehicle.part.gearbox; package garage.vehicle.part.gearbox;
public enum Gear { public enum Gear {
......
package vehicle.part.gearbox; package garage.vehicle.part.gearbox;
import vehicle.part.engine.EngineBrokenException; import garage.vehicle.part.engine.EngineBrokenException;
public interface GearBox { public interface GearBox {
...@@ -12,6 +12,6 @@ public interface GearBox { ...@@ -12,6 +12,6 @@ public interface GearBox {
void reverse() throws StallException, EngineBrokenException; void reverse() throws StallException, EngineBrokenException;
public Gear getCurrentGear(); Gear getCurrentGear();
} }
\ No newline at end of file
package vehicle.part.gearbox; package garage.vehicle.part.gearbox;
import java.util.Arrays; import java.util.Arrays;
......
package vehicle.part.gearbox; package garage.vehicle.part.gearbox;
import vehicle.part.engine.Engine; import garage.vehicle.part.engine.EngineBrokenException;
import vehicle.part.engine.EngineBrokenException;
public class GearBoxManual implements GearBox{ public class GearBoxManual implements GearBox{
......
package vehicle.part.gearbox; package garage.vehicle.part.gearbox;
public class StallException extends Exception { public class StallException extends Exception {
......
package vehicle.part.option; package garage.vehicle.part.option;
public class Aircon implements Option { public class Aircon implements Option {
......
package vehicle.part.option; package garage.vehicle.part.option;
public class CareerBars implements Option{ public class CareerBars implements Option{
public double getPrice() { public double getPrice() {
......
package vehicle.part.option; package garage.vehicle.part.option;
public class ElectricGlass implements Option{ public class ElectricGlass implements Option{
......
package vehicle.part.option; package garage.vehicle.part.option;
public class GPS implements Option { public class GPS implements Option {
......
package vehicle.part.option; package garage.vehicle.part.option;
public class HotSeat implements Option { public class HotSeat implements Option {
......
package vehicle.part.option; package garage.vehicle.part.option;
public interface Option { public interface Option {
......
package vehicle.part.pedal; package garage.vehicle.part.pedal;
import vehicle.part.engine.Engine;
public interface Pedal { public interface Pedal {
......
package vehicle.part.pedal; package garage.vehicle.part.pedal;
import vehicle.part.engine.Engine; import garage.vehicle.part.engine.Engine;
public class PedalAccelerator implements Pedal{ public class PedalAccelerator implements Pedal{
......
package vehicle.part.pedal; package garage.vehicle.part.pedal;
import vehicle.part.brake.Brake; import garage.vehicle.part.brake.Brake;
import vehicle.part.engine.Engine;
import java.util.List; import java.util.List;
......
package vehicle.part.pedal; package garage.vehicle.part.pedal;
import vehicle.part.engine.Engine; import garage.vehicle.part.gearbox.GearBoxManual;
import vehicle.part.gearbox.GearBox;
import vehicle.part.gearbox.GearBoxManual;
public class PedalClutch implements Pedal{ public class PedalClutch implements Pedal{
......
package vehicle.part.pedal; package garage.vehicle.part.pedal;
public enum PedalPosition { public enum PedalPosition {
......
package geometry;
public class Block { public class Block {
// VARIABLES // VARIABLES
......
public class Edge extends Point{ package geometry;
public class Edge extends Point {
// VARIABLES // VARIABLES
private Boolean begin; private Boolean begin;
......
package geometry;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
......
package geometry;
public class Point { public class Point {
private double x; private double x;
......
package geometry;
public class Segment { public class Segment {
// VARIABLES // VARIABLES
......
package geometry;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
......
package openclassroom;
public enum Couleur { public enum Couleur {
MARRON("marron"), MARRON("marron"),
......
package openclassroom;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;
public class Main {
public static void main(String[] args) {
List<Personne> listP = Arrays.asList(
new Personne(1.80, 70, "A", "Nicolas", Couleur.BLEU),
new Personne(1.56, 50, "B", "Nicole", Couleur.VERRON),
new Personne(1.75, 65, "C", "Germain", Couleur.VERT),
new Personne(1.68, 50, "D", "Michel", Couleur.ROUGE),
new Personne(1.96, 65, "E", "Cyrille", Couleur.BLEU),
new Personne(2.10, 120, "F", "Denis", Couleur.ROUGE),
new Personne(1.90, 90, "G", "Olivier", Couleur.VERRON)
);
Stream<Personne> sp = listP.stream();
sp.forEach(System.out::println);
System.out.println("\nAprès le filtre");
sp = listP.stream();
sp. filter(x -> x.getPoids() > 50)
.forEach(System.out::println);
System.out.println("\nAprès le filtre et le map");
sp = listP.stream();
sp. filter(x -> x.getPoids() > 50)
.map(x -> x.getPoids())
.forEach(System.out::println);
System.out.println("\nAprès le filtre et le map et reduce"); // Attention reduce consomme le stream et le rend inutilisable
sp = listP.stream();
Double sum = sp .filter(x -> x.getPoids() > 50)
.map(x -> x.getPoids())
.reduce(0.0d, (x,y) -> x+y);
System.out.println(sum);
/*
long count = sp .filter(x -> x.getPoids() > 50)
.map(x -> x.getPoids())
.count();
System.out.println("Nombre d'éléments restant après opérations : " + count);
sp = listP.stream();
List<Double> ld = sp.filter(x -> x.getPoids() > 50)
.map(x -> x.getPoids())
.collect(Collectors.toList());
System.out.println(ld); //récupère les informations sous le format défini, ici une liste
*/
}
}
import java.util.Scanner; package openclassroom;
import java.util.Scanner;
public class Personne { public class Personne {
...@@ -22,5 +23,17 @@ public class Personne { ...@@ -22,5 +23,17 @@ public class Personne {
s += ", et je mesure " + taille + " cm."; s += ", et je mesure " + taille + " cm.";
return s; return s;
} }
public Double getTaille() {return taille;}
public void setTaille(Double taille) {this.taille = taille;}
public Double getPoids() {return poids;}
public void setPoids(Double poids) {this.poids = poids;}
public String getNom() {return nom;}
public void setNom(String nom) {this.nom = nom;}
public String getPrenom() {return prenom;}
public void setPrenom(String prenom) {this.prenom = prenom;}
public Couleur getYeux() {return yeux;}
public void setYeux(Couleur yeux) {this.yeux = yeux;}
} }
package tests; package garage;
import org.junit.Assert;
import garage.vehicle.part.engine.DieselEngine;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import vehicle.part.engine.DieselEngine;
import static org.junit.Assert.*; import static org.junit.Assert.assertEquals;
public class DieselEngineTest { public class DieselEngineTest {
...@@ -17,8 +17,9 @@ public class DieselEngineTest { ...@@ -17,8 +17,9 @@ public class DieselEngineTest {
} }
@Test @Test
public void toStringTest() { public String toString() {
String expected = "Diesel vehicle.parts.Engine"; String expected = "Diesel vehicle.parts.Engine";
Assert.assertEquals(expected, dieselEngine.toString()); assertEquals(expected, dieselEngine.toString());
return null;
} }
} }
\ No newline at end of file
package tests; package garage;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.*; import org.junit.Test;
public class EngineTest { public class EngineTest {
......
package tests; package garage;
import garage.ExecutionFailedException; import garage.garage.Task;
import garage.Task; import garage.garage.TestBench;
import garage.TestBench; import garage.vehicle.Vehicle;
import junit.framework.TestCase; import garage.vehicle.VehicleModel;
import org.junit.Assert; import garage.vehicle.part.gearbox.Gear;
import garage.vehicle.part.pedal.PedalPosition;
import org.junit.Before; import org.junit.Before;
import org.junit.FixMethodOrder;
import org.junit.Test; import org.junit.Test;
import vehicle.Vehicle;
import vehicle.VehicleModel;
import vehicle.part.gearbox.Gear;
import vehicle.part.pedal.PedalAccelerator;
import vehicle.part.pedal.PedalPosition;
import java.util.Arrays; import java.util.Arrays;
import static junit.framework.TestCase.assertEquals; import static org.junit.Assert.*;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertNull;
public class TestBenchTest { public class TestBenchTest {
...@@ -38,72 +31,72 @@ public class TestBenchTest { ...@@ -38,72 +31,72 @@ public class TestBenchTest {
@Test @Test
public void addVehicleTest(){ public void addVehicleTest(){
Assert.assertNull(testBench.getVehicle()); assertNull(testBench.getVehicle());
testBench.addVehicle(fiat500); testBench.addVehicle(fiat500);
TestCase.assertEquals(fiat500, testBench.getVehicle()); assertEquals(fiat500, testBench.getVehicle());
} }
@Test @Test
public void addVehicleImpossibleTest(){ public void addVehicleImpossibleTest(){
Assert.assertNull(testBench.getVehicle()); assertNull(testBench.getVehicle());
testBench.addVehicle(fiat500); testBench.addVehicle(fiat500);
testBench.addVehicle(peugeot5008); testBench.addVehicle(peugeot5008);
TestCase.assertEquals(fiat500, testBench.getVehicle()); assertEquals(fiat500, testBench.getVehicle());
} }
@Test @Test
public void removeVehicleTest(){ public void removeVehicleTest(){
testBench.addVehicle(fiat500); testBench.addVehicle(fiat500);
TestCase.assertEquals(fiat500, testBench.getVehicle()); assertEquals(fiat500, testBench.getVehicle());
testBench.removeVehicle(); testBench.removeVehicle();
Assert.assertNull(testBench.getVehicle()); assertNull(testBench.getVehicle());
} }
@Test @Test
public void removeVehicleImpossibleTest(){ public void removeVehicleImpossibleTest(){
testBench.removeVehicle(); testBench.removeVehicle();
Assert.assertNull(testBench.getVehicle()); assertNull(testBench.getVehicle());
} }
@Test @Test
public void swapVehicleTest(){ public void swapVehicleTest(){
testBench.addVehicle(fiat500); testBench.addVehicle(fiat500);
TestCase.assertEquals(fiat500, testBench.getVehicle()); assertEquals(fiat500, testBench.getVehicle());
Vehicle swapped = testBench.swapVehicle(peugeot5008); Vehicle swapped = testBench.swapVehicle(peugeot5008);
TestCase.assertEquals(fiat500, swapped); assertEquals(fiat500, swapped);
TestCase.assertEquals(peugeot5008, testBench.getVehicle()); assertEquals(peugeot5008, testBench.getVehicle());
} }
@Test @Test
public void swapVehicleImpossibleTest(){ public void swapVehicleImpossibleTest(){
Vehicle swapped = testBench.swapVehicle(peugeot5008); Vehicle swapped = testBench.swapVehicle(peugeot5008);
Assert.assertNull(swapped); assertNull(swapped);
Assert.assertNull(testBench.getVehicle()); assertNull(testBench.getVehicle());
} }
@Test @Test
public void addTaskTest(){ public void addTaskTest(){
TestCase.assertEquals(0, testBench.getTasks().size()); assertEquals(0, testBench.getTasks().size());
testBench.addTask(task); testBench.addTask(task);
TestCase.assertEquals(1, testBench.getTasks().size()); assertEquals(1, testBench.getTasks().size());
TestCase.assertTrue(testBench.getTasks().contains(task)); assertTrue(testBench.getTasks().contains(task));
} }
@Test @Test
public void removeTaskTest(){ public void removeTaskTest(){
testBench.addTask(task); testBench.addTask(task);
TestCase.assertEquals(1, testBench.getTasks().size()); assertEquals(1, testBench.getTasks().size());
testBench.removeTask(task); testBench.removeTask(task);
TestCase.assertEquals(0, testBench.getTasks().size()); assertEquals(0, testBench.getTasks().size());
} }
@Test @Test
public void runTest(){ public void runTest(){
testBench.addVehicle(fiat500); testBench.addVehicle(fiat500);
testBench.addTask(task); testBench.addTask(task);
TestCase.assertEquals(0d, fiat500.getPedals().get(0).getState()); assertEquals(0d, fiat500.getPedals().get(0).getState(), 0d);
testBench.run(10); testBench.run(10);
TestCase.assertEquals(50d, fiat500.getPedals().get(0).getState()); assertEquals(50d, fiat500.getPedals().get(0).getState(), 0d);
} }
@Test @Test
...@@ -123,9 +116,9 @@ public class TestBenchTest { ...@@ -123,9 +116,9 @@ public class TestBenchTest {
testBench.addTask(new Task(fiat500.getGearBox(), "gearUp", null, 3)); testBench.addTask(new Task(fiat500.getGearBox(), "gearUp", null, 3));
testBench.addTask(new Task(fiat500.getPedals().get(PedalPosition.CLUTCH.getValue()), "setState", Arrays.asList(0d), 4)); testBench.addTask(new Task(fiat500.getPedals().get(PedalPosition.CLUTCH.getValue()), "setState", Arrays.asList(0d), 4));
TestCase.assertEquals(Gear.NEUTRAL, fiat500.getGearBox().getCurrentGear()); assertEquals(Gear.NEUTRAL, fiat500.getGearBox().getCurrentGear());
testBench.run(10); testBench.run(10);
TestCase.assertEquals(Gear.FIRST, fiat500.getGearBox().getCurrentGear()); assertEquals(Gear.FIRST, fiat500.getGearBox().getCurrentGear());
} }
} }
package geometry;
import org.junit.Test; import org.junit.Test;
public class TestEdge { public class TestEdge {
......
package geometry;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
......
package geometry;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
......
package test; package openclassroom;
import openclassroom.Personne;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment