Compare commits
No commits in common. "e5d3a789e6f19db59f894aa6068c5292f5f28137" and "b587d1a40160c698674aa71cf66a00b9581e8673" have entirely different histories.
e5d3a789e6
...
b587d1a401
12
.idea/ChareSWE.iml
generated
Normal file
12
.idea/ChareSWE.iml
generated
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?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" />
|
||||||
|
<orderEntry type="library" name="jars" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@ -3,7 +3,7 @@
|
|||||||
<component name="JavaScriptSettings">
|
<component name="JavaScriptSettings">
|
||||||
<option name="languageLevel" value="ES6" />
|
<option name="languageLevel" value="ES6" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" default="true" project-jdk-name="10" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" default="false" project-jdk-name="10" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/../gitchareswe" />
|
<output url="file://$USER_HOME$/gitchareswe" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
2
.idea/modules.xml
generated
2
.idea/modules.xml
generated
@ -2,7 +2,7 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/ChareSWE.iml" filepath="$PROJECT_DIR$/ChareSWE.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/ChareSWE.iml" filepath="$PROJECT_DIR$/.idea/ChareSWE.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -2,14 +2,10 @@ public class Account {
|
|||||||
public Person owner;
|
public Person owner;
|
||||||
public String email;
|
public String email;
|
||||||
|
|
||||||
Account(Person owner, String email){
|
|
||||||
this.owner = owner;
|
|
||||||
this.email = email;
|
|
||||||
}
|
|
||||||
public void accountErstellen(Person p, String e_email){
|
public void accountErstellen(Person p, String e_email){
|
||||||
|
|
||||||
this.owner = p;
|
|
||||||
this.email = e_email;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ public class CredentialsTest{
|
|||||||
public void testTwo(){
|
public void testTwo(){
|
||||||
|
|
||||||
Credentials c = new Credentials("hofmannol", "GERONIMO");
|
Credentials c = new Credentials("hofmannol", "GERONIMO");
|
||||||
assertEquals("hofmannol", c.login);
|
assertTrue(c.valid());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -6,7 +6,6 @@ public class Person {
|
|||||||
public int age;
|
public int age;
|
||||||
|
|
||||||
Person(String name, String vname, int age){
|
Person(String name, String vname, int age){
|
||||||
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.vname = vname;
|
this.vname = vname;
|
||||||
this.age = age;
|
this.age = age;
|
||||||
|
@ -3,20 +3,17 @@ public class Spender extends Person{
|
|||||||
private int amount;
|
private int amount;
|
||||||
|
|
||||||
public Spender (String fname, String lname, int age, int summe){
|
public Spender (String fname, String lname, int age, int summe){
|
||||||
|
|
||||||
super(fname, lname, age);
|
super(fname, lname, age);
|
||||||
this.amount = summe;
|
this.amount = summe;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void betragSetzen(int summe){
|
public void betragSetzen(int summe){
|
||||||
|
|
||||||
if(summe > 0){
|
if(summe > 0){
|
||||||
amount = summe;
|
amount = summe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAmount(){
|
public int getAmount(){
|
||||||
|
|
||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
import org.junit.Test;
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
|
|
||||||
public class TestAccount {
|
|
||||||
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void test1(){
|
|
||||||
|
|
||||||
// Arrange
|
|
||||||
Person p = new Person("Hans","Georg", 12);
|
|
||||||
|
|
||||||
|
|
||||||
// Act
|
|
||||||
Account a = new Account(p, "fdfdf");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
assertEquals("Georg", a.owner.vname);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testM2(){
|
|
||||||
// Arrange
|
|
||||||
Person p = new Person("Hans","Georg", 12);
|
|
||||||
|
|
||||||
|
|
||||||
// Act
|
|
||||||
Account a = new Account(p, "fdfdf");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
assertEquals("Georg", a.owner.vname);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void test3(){
|
|
||||||
// Arrange
|
|
||||||
Person p = new Person("Hans","Georg", 12);
|
|
||||||
|
|
||||||
|
|
||||||
// Act
|
|
||||||
Account a = new Account(p, "fdfdf");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
assertEquals(12, a.owner.age);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -12,5 +12,4 @@ public class TestKorndoerfer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user