Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
beamline
Framework
Commits
03024c96
Commit
03024c96
authored
3 years ago
by
Andrea Burattin
Browse files
Options
Downloads
Patches
Plain Diff
Improved code quality
parent
fbdc861e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/beamline/tests/ResponsesTest.java
+14
-7
14 additions, 7 deletions
src/test/java/beamline/tests/ResponsesTest.java
with
14 additions
and
7 deletions
src/test/java/beamline/tests/ResponsesTest.java
+
14
−
7
View file @
03024c96
package
beamline.tests
;
package
beamline.tests
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertEquals
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertEquals
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertFalse
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertNotEquals
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertNotEquals
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertThrows
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertThrows
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertTrue
;
import
java.util.Random
;
import
java.util.Random
;
import
java.util.UUID
;
import
java.util.UUID
;
...
@@ -48,15 +47,23 @@ public class ResponsesTest {
...
@@ -48,15 +47,23 @@ public class ResponsesTest {
assertEquals
(
df
,
df2
);
assertEquals
(
df
,
df2
);
assertNotEquals
(
df
,
df3
);
assertNotEquals
(
df
,
df3
);
assertNotEquals
(
null
,
df
);
assertNotEquals
(
null
,
df
);
assertNotEquals
(
"-"
,
df
);
assertEquals
(
df
,
df
);
assertTrue
(
df
.
hashCode
()
==
df2
.
hashCode
());
assertFalse
(
df
.
hashCode
()
==
df3
.
hashCode
());
assertEquals
(
"c1"
,
df
.
getCaseId
());
assertEquals
(
"c1"
,
df
.
getCaseId
());
}
}
@Test
public
void
test_equals
()
throws
EventException
{
BEvent
e21
=
BEvent
.
create
(
"p"
,
"a"
,
"c1"
);
BEvent
e22
=
BEvent
.
create
(
"p"
,
"b"
,
"c1"
);
BEvent
e23
=
BEvent
.
create
(
"p"
,
"a"
,
"c2"
);
BEvent
e24
=
BEvent
.
create
(
"p"
,
"b"
,
"c2"
);
DirectlyFollowsRelation
df
=
new
DirectlyFollowsRelation
(
e21
,
e22
);
DirectlyFollowsRelation
df2
=
new
DirectlyFollowsRelation
(
e23
,
e24
);
assertThat
(
df
).
isEqualTo
(
df
).
hasSameHashCodeAs
(
df2
);
}
@Test
@Test
public
void
string_tests
()
{
public
void
string_tests
()
{
String
unique
=
UUID
.
randomUUID
().
toString
();
String
unique
=
UUID
.
randomUUID
().
toString
();
...
...
This diff is collapsed.
Click to expand it.
andbur
@andbur
mentioned in commit
518ba372
·
2 years ago
mentioned in commit
518ba372
mentioned in commit 518ba3720632f9aae19013f61c6d58f6ecf8a586
Toggle commit list
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