Skip to content
GitLab
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
e02b8873
Verified
Commit
e02b8873
authored
Dec 14, 2020
by
Lukas Wiest
🚂
Browse files
initial commit
parents
Changes
2
Show whitespace changes
Inline
Side-by-side
.gitignore
0 → 100644
View file @
e02b8873
*.class
# IntelliJ
/.idea
/out
*.iml
test/de/hftstuttgart/ip2/CalculatorTest.java
0 → 100644
View file @
e02b8873
package
de.hftstuttgart.ip2
;
import
org.junit.jupiter.api.Test
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
public
class
CalculatorTest
{
private
Calculator
calculator
=
new
Calculator
();
@Test
public
void
add
()
throws
Exception
{
assertEquals
(
5
,
calculator
.
add
(
2
,
3
),
0.1
);
}
@Test
public
void
sub
()
throws
Exception
{
assertEquals
(-
1
,
calculator
.
sub
(
2
,
3
),
0.1
);
}
@Test
public
void
mult
()
throws
Exception
{
assertEquals
(
15
,
calculator
.
mult
(
5
,
3
),
0.1
);
}
@Test
public
void
div
()
throws
Exception
{
assertEquals
(
5
,
calculator
.
div
(
15
,
3
),
0.1
);
}
@Test
public
void
sum
()
throws
Exception
{
assertEquals
(
12
,
calculator
.
sum
(
3
,
4
,
5
),
0.1
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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