Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
decomposition_and_conditionals_homework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mkovar
decomposition_and_conditionals_homework
Commits
a500c2bf
Commit
a500c2bf
authored
6 years ago
by
Suzette J Person
Browse files
Options
Downloads
Patches
Plain Diff
added test cases for exception handling
parent
14c7031d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/edu/unl/cse/soft160/decomposition_and_conditionals/ParityTest.java
+13
-2
13 additions, 2 deletions
...se/soft160/decomposition_and_conditionals/ParityTest.java
with
13 additions
and
2 deletions
src/test/java/edu/unl/cse/soft160/decomposition_and_conditionals/ParityTest.java
+
13
−
2
View file @
a500c2bf
...
...
@@ -78,8 +78,19 @@ public class ParityTest extends TestCase {
public
void
testUnknownEven
()
{
assertEquals
(
assemble
(
"Enter parity of multiplier: Enter parity of multiplicand: The parity of the product of an
EVE
N number and an
UNKNOW
N number is EVEN."
),
runMain
(
"
EVEN"
,
"UNKNOW
N"
));
"Enter parity of multiplier: Enter parity of multiplicand: The parity of the product of an
UNKNOW
N number and an
EVE
N number is EVEN."
),
runMain
(
"
UNKNOWN"
,
"EVE
N"
));
}
public
void
testExceptionInMultiplier
()
{
assertEquals
(
assemble
(
"Enter parity of multiplier: Parity must be one of EVEN, ODD, or UNKNOWN."
),
runMain
(
"FOO"
,
"EVEN"
));
}
public
void
testExceptionInMultiplicand
()
{
assertEquals
(
assemble
(
"Enter parity of multiplier: Enter parity of multiplicand: Parity must be one of EVEN, ODD, or UNKNOWN."
),
runMain
(
"EVEN"
,
"BAR"
));
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment