Skip to content

Testübungen#11

Open
salni84 wants to merge 2 commits intoibwgr:masterfrom
salni84:master
Open

Testübungen#11
salni84 wants to merge 2 commits intoibwgr:masterfrom
salni84:master

Conversation

@salni84
Copy link

@salni84 salni84 commented Oct 30, 2019

No description provided.

Roberto Salerno added 2 commits October 30, 2019 20:07
}


public static void main (String[] args){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Klassen welche nur Daten beinhalten haben keine main Methode. Um die Klasse zu testen haben wir die Unit-Tests. Die Unit-Tests sind quasi unsere Main-Methoden, welche wir laufen lassen. Die Klasse Person verwenden wir dann einfach dort.

@Test
void getAgeReturns10YearsIfBornIn2009() throws Exception {
Person p = new Person("", "", LocalDate.of(2009, 1, 1));
void getAgeReturned10Years() throws Exception{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Da fehlt die Bedingung im Methoden/Testnamen. z.B: getAgeReturns10YearsIfBorn10YearsAgo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants