Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
isochrone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Institut für Informatik
dbis
dbis-isochrone
isochrone
Commits
9623e185
Commit
9623e185
authored
11 years ago
by
Nikolaus Krismer
Browse files
Options
Downloads
Patches
Plain Diff
fixed problem which caused test skipping
parent
a4bef35c
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/it/unibz/inf/isochrone/db/DatabaseTest.java
+12
-5
12 additions, 5 deletions
src/test/java/it/unibz/inf/isochrone/db/DatabaseTest.java
with
12 additions
and
5 deletions
src/test/java/it/unibz/inf/isochrone/db/DatabaseTest.java
+
12
−
5
View file @
9623e185
...
...
@@ -22,8 +22,6 @@ public class DatabaseTest {
private
static
final
int
EXPECTED_NODE_COUNT
=
2687
;
private
static
final
int
LINK_ID
=
1846
;
private
static
final
int
NODE_ID
=
5013
;
private
Database
db
;
private
Map
<
Integer
,
Node
>
nodes
;
private
Map
<
Integer
,
Link
>
links
;
...
...
@@ -31,9 +29,6 @@ public class DatabaseTest {
public
void
setUp
()
{
nodes
=
new
HashMap
<
Integer
,
Node
>();
links
=
new
LinkedHashMap
<
Integer
,
Link
>();
db
=
new
Database
(
Dataset
.
BZ
,
Mode
.
MULTIMODAL
,
Direction
.
INCOMING
);
db
.
readNetwork
(
nodes
,
links
);
}
@AfterTest
...
...
@@ -47,6 +42,7 @@ public class DatabaseTest {
@Test
public
void
testCreateDatabaseObject
()
{
final
Database
db
=
new
Database
(
Dataset
.
BZ
,
Mode
.
MULTIMODAL
,
Direction
.
INCOMING
);
Assert
.
assertNotNull
(
db
,
"Database object could not be created!"
);
}
...
...
@@ -56,12 +52,16 @@ public class DatabaseTest {
final
LinkedHashMap
<
Integer
,
Link
>
compareLinks
=
new
LinkedHashMap
<
Integer
,
Link
>();
fillHashMaps
(
compareNodes
,
compareLinks
);
initDb
();
Assert
.
assertEquals
(
nodes
.
get
(
NODE_ID
),
compareNodes
.
get
(
NODE_ID
),
"Nodes comparison"
);
Assert
.
assertEquals
(
links
.
get
(
LINK_ID
),
compareLinks
.
get
(
LINK_ID
),
"Links comparison"
);
}
@Test
public
void
testCountEdges
()
{
initDb
();
// 2687 Doesn't correspond to the number of nodes in
// the nodes table, but the number of distinct
// target/source node in the edges table
...
...
@@ -71,6 +71,13 @@ public class DatabaseTest {
// Private methods
private
Database
initDb
()
{
final
Database
db
=
new
Database
(
Dataset
.
BZ
,
Mode
.
MULTIMODAL
,
Direction
.
INCOMING
);
db
.
readNetwork
(
nodes
,
links
);
return
db
;
}
private
void
fillHashMaps
(
final
HashMap
<
Integer
,
Node
>
nodeHashMap
,
final
LinkedHashMap
<
Integer
,
Link
>
linkHashMap
)
{
final
Node
n1
=
new
Node
(
NODE_ID
);
...
...
This diff is collapsed.
Click to expand it.
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