Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
S
Synchronization_of_threads
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yazan.halloul
Synchronization_of_threads
Commits
4f54e8fa
Commit
4f54e8fa
authored
Nov 28, 2023
by
yazan.halloul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test LineSequenceComparator and LineSequence Classes
parent
e3949f82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
LineSequenceComparatorTest.java
src/test/java/LineSequenceComparatorTest.java
+28
-0
LineSequenceComparatorTest.class
target/test-classes/LineSequenceComparatorTest.class
+0
-0
No files found.
src/test/java/LineSequenceComparatorTest.java
0 → 100644
View file @
4f54e8fa
import
benefit_classes.LineSequence
;
import
benefit_classes.LineSequenceComparator
;
import
junit.framework.Assert
;
import
junit.framework.TestCase
;
public
class
LineSequenceComparatorTest
extends
TestCase
{
public
LineSequence
lineSequence1
;
public
LineSequence
lineSequence2
;
public
LineSequenceComparator
lineSequenceComparator
;
public
void
testIsGreaterThan
(){
lineSequenceComparator
=
new
LineSequenceComparator
();
lineSequence1
=
new
LineSequence
(
"test"
,
1
);
lineSequence2
=
new
LineSequence
(
"test"
,
2
);
assertEquals
(
lineSequenceComparator
.
compare
(
lineSequence1
,
lineSequence2
),-
1
);
}
public
void
testIsLessThan
(){
lineSequenceComparator
=
new
LineSequenceComparator
();
lineSequence1
=
new
LineSequence
(
"test"
,
2
);
lineSequence2
=
new
LineSequence
(
"test"
,
1
);
assertEquals
(
lineSequenceComparator
.
compare
(
lineSequence1
,
lineSequence2
),
1
);
}
public
void
testIsEqual
(){
lineSequenceComparator
=
new
LineSequenceComparator
();
lineSequence1
=
new
LineSequence
(
"test"
,
1
);
lineSequence2
=
new
LineSequence
(
"test"
,
1
);
assertEquals
(
lineSequenceComparator
.
compare
(
lineSequence1
,
lineSequence2
),
0
);
}
}
target/test-classes/LineSequenceComparatorTest.class
0 → 100644
View file @
4f54e8fa
File added
Write
Preview
Markdown
is supported
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