Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CoTA
examples
cota-tests-calc-jdk
Commits
525d21ce
Commit
525d21ce
authored
1 year ago
by
Lückemeyer
Browse files
Options
Download
Email Patches
Plain Diff
added second test updated to junit5
parent
5ca51ba0
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/de/hftstuttgart/ip2/CalculatorSecondTest.java
+36
-0
test/de/hftstuttgart/ip2/CalculatorSecondTest.java
with
36 additions
and
0 deletions
+36
-0
test/de/hftstuttgart/ip2/CalculatorSecondTest.java
0 → 100644
+
36
-
0
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
);
}
}
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets