Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
G4-SoftEng
Group4-SoftEng
Commits
dedb7e8f
Commit
dedb7e8f
authored
Jun 19, 2021
by
saddamonpc
Browse files
Remove unneeded classes and Add Jerome's tests
parent
b3cf240b
Pipeline
#82656
passed with stage
in 1 minute and 24 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/softeng/g4/appointment/Reminder.java
deleted
100644 → 0
View file @
b3cf240b
package
softeng.g4.appointment
;
public
class
Reminder
{
}
src/main/java/softeng/g4/appointment/RequestAppointment.java
deleted
100644 → 0
View file @
b3cf240b
package
softeng.g4.appointment
;
public
class
RequestAppointment
{
}
src/test/java/softeng/g4/user/StudentTest.java
View file @
dedb7e8f
...
...
@@ -8,6 +8,9 @@ import softeng.g4.cli.ListIO;
import
softeng.g4.course.Course
;
import
softeng.g4.course.CourseList
;
import
java.io.ByteArrayOutputStream
;
import
java.io.PrintStream
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
class
StudentTest
{
...
...
@@ -41,20 +44,60 @@ class StudentTest {
@Test
void
seeCalendar
()
{
ByteArrayOutputStream
outContent
=
new
ByteArrayOutputStream
();
System
.
setOut
(
new
PrintStream
(
outContent
));
testTa
.
setSchedule
(
"monday"
,
"Busy"
,
"07:00"
,
"21:00"
);
testTa
.
setSchedule
(
"tuesday"
,
"Busy"
,
"07:00"
,
"21:00"
);
testTa
.
setSchedule
(
"wednesday"
,
"Busy"
,
"07:00"
,
"21:00"
);
testTa
.
setSchedule
(
"thursday"
,
"Busy"
,
"07:00"
,
"21:00"
);
testTa
.
setSchedule
(
"friday"
,
"Busy"
,
"07:00"
,
"21:00"
);
testTa
.
setSchedule
(
"saturday"
,
"Busy"
,
"07:00"
,
"21:00"
);
testTa
.
setSchedule
(
"sunday"
,
"Busy"
,
"07:00"
,
"21:00"
);
new
TeachingAssistant
(
"testTA"
,
"Test TA"
,
Long
.
valueOf
(
"1"
),
userList
);
testStudent
.
seeCalendar
(
"testTa"
,
userList
);
String
outContentEdit
=
outContent
.
toString
().
replaceAll
(
"\n"
,
""
).
replaceAll
(
"\r"
,
""
);
String
expectedOutput
=
"Monday:"
+
"Busy 07:00 - 21:00"
+
"Tuesday:"
+
"Busy 07:00 - 21:00"
+
"Wednesday:"
+
"Busy 07:00 - 21:00"
+
"Thursday:"
+
"Busy 07:00 - 21:00"
+
"Friday:"
+
"Busy 07:00 - 21:00"
+
"Saturday:"
+
"Busy 07:00 - 21:00"
+
"Sunday:"
+
"Busy 07:00 - 21:00"
;
assertEquals
(
expectedOutput
,
outContentEdit
);
}
@Test
void
getRole
()
{
}
@Test
void
getUsername
()
{
testStudent
=
new
Student
(
"Kevin"
,
"Kevin Kurn"
,
Long
.
valueOf
(
"987654321"
),
userList
);
assertEquals
(
testStudent
.
getUsername
(),
"Kevin"
);
}
@Test
void
testToString
()
{
testStudent
=
new
Student
(
"Jerome"
,
"Jerome Emmanuel"
,
Long
.
valueOf
(
"123456789"
),
userList
);
assertEquals
(
testStudent
.
toString
(),
"Jerome - Jerome Emmanuel"
);
}
@AfterEach
void
finalTearDown
()
{
courseList
=
new
CourseList
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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