Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
HFTSoftwareProject
testcases
Commits
4b8e530e
Commit
4b8e530e
authored
Sep 24, 2024
by
Younis
Browse files
Add new file ClosetTest
parent
92fcb256
Changes
1
Hide whitespace changes
Inline
Side-by-side
ClosetTest.java
0 → 100644
View file @
4b8e530e
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
public
class
ClosetTest
{
@Test
public
void
testCloset
()
{
Closet
myCloset
=
new
MyCloset
();
Clothing
sweater1
=
new
Clothing
(
"Red"
,
"M"
);
Clothing
sweater2
=
new
Clothing
(
"Blue"
,
"S"
);
Clothing
pants1
=
new
Clothing
(
"Black"
,
"L"
);
Clothing
pants2
=
new
Clothing
(
"Blue"
,
"S"
);
myCloset
.
addClothing
(
sweater1
);
myCloset
.
addClothing
(
pants1
);
assertTrue
(
myCloset
.
hasClothing
(
sweater1
));
assertFalse
(
myCloset
.
hasClothing
(
sweater2
));
assertTrue
(
myCloset
.
hasClothing
(
pants1
));
assertFalse
(
myCloset
.
hasClothing
(
pants2
));
}
}
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