FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java/src/test/java/com/others/RoundRobinTest.java at Development · iDev-git/Java · GitHub
iDev-git
Java
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Java
/
src
/
test
/
java
/
com
/
others
/
RoundRobinTest.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (21 loc) · 780 Bytes
Breadcrumbs
Java
/
src
/
test
/
java
/
com
/
others
/
RoundRobinTest.java
Copy path
File metadata and controls
26 lines (21 loc) · 780 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package
src
.
test
.
java
.
com
.
others
;
import
org
.
junit
.
Assert
;
import
org
.
junit
.
Test
;
import
src
.
main
.
java
.
com
.
others
.
RoundRobin
;
public
class
RoundRobinTest
{
private
final
int
[]
burstTime
= {
5
,
15
,
4
,
3
};
private
final
RoundRobin
roundRobin
=
new
RoundRobin
();
@
Test
public
void
testWaitingTime
() {
int
[]
expectedTime
= {
9
,
12
,
14
,
9
};
int
[]
realtime
=
roundRobin
.
calcWaitingTime
(
burstTime
,
3
);
Assert
.
assertArrayEquals
(
realtime
,
expectedTime
);
}
@
Test
public
void
testTurnAroundTIme
() {
int
[]
expectedTIme
= {
14
,
27
,
18
,
12
};
int
[]
waitingTime
= {
9
,
12
,
14
,
9
};
int
[]
realTime
=
roundRobin
.
calcTurnAroundTime
(
burstTime
,
waitingTime
);
Assert
.
assertArrayEquals
(
realTime
,
expectedTIme
);
}
}
Back
|
FazBrowse Home
|
New Git URL