Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dotsandboxes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Chandana Maturi
dotsandboxes
Commits
70984618
Commit
70984618
authored
3 years ago
by
Chandana Maturi
Browse files
Options
Downloads
Patches
Plain Diff
unit testing failed
parent
18a0a268
No related branches found
No related tags found
No related merge requests found
Pipeline
#1609
failed
3 years ago
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/dotsandboxes/DotsAndBoxesGridTest.java
+27
-0
27 additions, 0 deletions
src/test/java/dotsandboxes/DotsAndBoxesGridTest.java
with
27 additions
and
0 deletions
src/test/java/dotsandboxes/DotsAndBoxesGridTest.java
+
27
−
0
View file @
70984618
...
...
@@ -28,4 +28,31 @@ public class DotsAndBoxesGridTest {
}
// FIXME: You need to write tests for the two known bugs in the code.
@Test
public
void
checkforBoxComplete
()
{
logger
.
info
(
"Check wheather the box is complete is wrong or not"
);
int
x
=
1
;
int
y
=
1
;
int
p
=
1
;
DotsAndBoxesGrid
z
=
new
DotsAndBoxesGrid
(
x
,
y
,
p
);
assertFalse
(
z
.
boxComplete
(
x
,
y
));
}
@Test
public
void
testExistingLine
()
{
logger
.
info
(
"testing exception is thrown when line exists"
);
int
x
=
2
;
int
y
=
3
;
int
p
=
2
;
int
w
=
12
;
int
h
=
3
;
DotsAndBoxesGrid
z
=
new
DotsAndBoxesGrid
(
w
,
h
,
p
);
z
.
drawHorizontal
(
x
,
y
,
p
);
assertThrows
(
IllegalStateException
.
class
,
()
->
z
.
drawHorizontal
(
x
,
y
,
p
),
"The line exists"
);
}
}
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