Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Dockerized Testing Toolkit
Beispiel - OpenJDK11-Junit5 Calculator Test
Commits
525d21ce
Commit
525d21ce
authored
Oct 24, 2023
by
Lückemeyer
Browse files
added second test updated to junit5
parent
5ca51ba0
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/de/hftstuttgart/ip2/CalculatorSecondTest.java
0 → 100644
View file @
525d21ce
package
de.hftstuttgart.ip2
;
import
org.junit.jupiter.api.Test
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
public
class
CalculatorSecondTest
{
private
Calculator
calculator
=
new
Calculator
();
@Test
public
void
add2
()
throws
Exception
{
assertEquals
(
5
,
calculator
.
add
(
2
,
3
),
0.1
);
}
@Test
public
void
sub2
()
throws
Exception
{
assertEquals
(-
1
,
calculator
.
sub
(
2
,
3
),
0.1
);
}
@Test
public
void
mult2
()
throws
Exception
{
assertEquals
(
15
,
calculator
.
mult
(
5
,
2
),
0.1
);
}
@Test
public
void
div2
()
throws
Exception
{
assertEquals
(
5
,
calculator
.
div
(
15
,
3
),
0.1
);
}
@Test
public
void
sum2
()
throws
Exception
{
assertEquals
(
12
,
calculator
.
sum
(
3
,
4
,
5
),
0.1
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment