Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
1775d74b
Commit
1775d74b
authored
16 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
fix: unit tests
SVN: 7256
parent
d4d8d202
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datamover_console/sourceTest/java/ch/systemsx/cisd/datamover/console/server/DatamoverConsolerServiceTest.java
+29
-7
29 additions, 7 deletions
...atamover/console/server/DatamoverConsolerServiceTest.java
with
29 additions
and
7 deletions
datamover_console/sourceTest/java/ch/systemsx/cisd/datamover/console/server/DatamoverConsolerServiceTest.java
+
29
−
7
View file @
1775d74b
...
@@ -93,6 +93,13 @@ public class DatamoverConsolerServiceTest
...
@@ -93,6 +93,13 @@ public class DatamoverConsolerServiceTest
@Test
@Test
public
void
testGetApplicationInfo
()
public
void
testGetApplicationInfo
()
{
{
context
.
checking
(
new
Expectations
()
{
{
one
(
dm1
).
check
();
one
(
dm2
).
check
();
}
});
ApplicationInfo
applicationInfo
=
createService
().
getApplicationInfo
();
ApplicationInfo
applicationInfo
=
createService
().
getApplicationInfo
();
assertEquals
(
42000
,
applicationInfo
.
getRefreshTimeInterval
());
assertEquals
(
42000
,
applicationInfo
.
getRefreshTimeInterval
());
...
@@ -133,6 +140,9 @@ public class DatamoverConsolerServiceTest
...
@@ -133,6 +140,9 @@ public class DatamoverConsolerServiceTest
context
.
checking
(
new
Expectations
()
context
.
checking
(
new
Expectations
()
{
{
{
{
one
(
dm1
).
check
();
one
(
dm2
).
check
();
one
(
authenticationService
).
authenticateApplication
();
one
(
authenticationService
).
authenticateApplication
();
will
(
returnValue
(
null
));
will
(
returnValue
(
null
));
...
@@ -160,6 +170,9 @@ public class DatamoverConsolerServiceTest
...
@@ -160,6 +170,9 @@ public class DatamoverConsolerServiceTest
context
.
checking
(
new
Expectations
()
context
.
checking
(
new
Expectations
()
{
{
{
{
one
(
dm1
).
check
();
one
(
dm2
).
check
();
one
(
authenticationService
).
authenticateApplication
();
one
(
authenticationService
).
authenticateApplication
();
String
aToken
=
"atoken"
;
String
aToken
=
"atoken"
;
will
(
returnValue
(
aToken
));
will
(
returnValue
(
aToken
));
...
@@ -186,6 +199,9 @@ public class DatamoverConsolerServiceTest
...
@@ -186,6 +199,9 @@ public class DatamoverConsolerServiceTest
context
.
checking
(
new
Expectations
()
context
.
checking
(
new
Expectations
()
{
{
{
{
one
(
dm1
).
check
();
one
(
dm2
).
check
();
one
(
authenticationService
).
authenticateApplication
();
one
(
authenticationService
).
authenticateApplication
();
String
aToken
=
"atoken"
;
String
aToken
=
"atoken"
;
will
(
returnValue
(
aToken
));
will
(
returnValue
(
aToken
));
...
@@ -246,8 +262,8 @@ public class DatamoverConsolerServiceTest
...
@@ -246,8 +262,8 @@ public class DatamoverConsolerServiceTest
@Test
@Test
public
void
testListDatamoverInfos
()
public
void
testListDatamoverInfos
()
{
{
IDatamoverConsoleService
service
=
createService
();
prepareForAuthenticated
();
prepareForAuthenticated
();
IDatamoverConsoleService
service
=
createService
();
context
.
checking
(
new
Expectations
()
context
.
checking
(
new
Expectations
()
{
{
{
{
...
@@ -282,8 +298,8 @@ public class DatamoverConsolerServiceTest
...
@@ -282,8 +298,8 @@ public class DatamoverConsolerServiceTest
public
void
testListDatamoverInfoWithError
()
public
void
testListDatamoverInfoWithError
()
{
{
final
String
msg
=
"[first target]\nsomething's fishy"
;
final
String
msg
=
"[first target]\nsomething's fishy"
;
IDatamoverConsoleService
service
=
createService
();
prepareForAuthenticated
();
prepareForAuthenticated
();
IDatamoverConsoleService
service
=
createService
();
context
.
checking
(
new
Expectations
()
context
.
checking
(
new
Expectations
()
{
{
{
{
...
@@ -316,8 +332,8 @@ public class DatamoverConsolerServiceTest
...
@@ -316,8 +332,8 @@ public class DatamoverConsolerServiceTest
@Test
@Test
public
void
testGetTargets
()
public
void
testGetTargets
()
{
{
IDatamoverConsoleService
service
=
createService
();
prepareForAuthenticated
();
prepareForAuthenticated
();
IDatamoverConsoleService
service
=
createService
();
Map
<
String
,
String
>
targets
=
service
.
getTargets
();
Map
<
String
,
String
>
targets
=
service
.
getTargets
();
assertEquals
(
"{t1=target1, t2=target2}"
,
targets
.
toString
());
assertEquals
(
"{t1=target1, t2=target2}"
,
targets
.
toString
());
...
@@ -328,8 +344,8 @@ public class DatamoverConsolerServiceTest
...
@@ -328,8 +344,8 @@ public class DatamoverConsolerServiceTest
@Test
@Test
public
void
testListDatamoverInfosNotAuthenticated
()
public
void
testListDatamoverInfosNotAuthenticated
()
{
{
IDatamoverConsoleService
service
=
createService
();
prepareForNotAuthenticated
();
prepareForNotAuthenticated
();
IDatamoverConsoleService
service
=
createService
();
try
try
{
{
...
@@ -346,8 +362,8 @@ public class DatamoverConsolerServiceTest
...
@@ -346,8 +362,8 @@ public class DatamoverConsolerServiceTest
@Test
@Test
public
void
testGetTargetsNotAuthenticated
()
public
void
testGetTargetsNotAuthenticated
()
{
{
IDatamoverConsoleService
service
=
createService
();
prepareForNotAuthenticated
();
prepareForNotAuthenticated
();
IDatamoverConsoleService
service
=
createService
();
try
try
{
{
...
@@ -395,8 +411,8 @@ public class DatamoverConsolerServiceTest
...
@@ -395,8 +411,8 @@ public class DatamoverConsolerServiceTest
@Test
@Test
public
void
testStartDatamoverNotAuthenticated
()
public
void
testStartDatamoverNotAuthenticated
()
{
{
IDatamoverConsoleService
service
=
createService
();
prepareForNotAuthenticated
();
prepareForNotAuthenticated
();
IDatamoverConsoleService
service
=
createService
();
try
try
{
{
...
@@ -443,8 +459,8 @@ public class DatamoverConsolerServiceTest
...
@@ -443,8 +459,8 @@ public class DatamoverConsolerServiceTest
@Test
@Test
public
void
testShutdownDatamoverNotAuthenticated
()
public
void
testShutdownDatamoverNotAuthenticated
()
{
{
IDatamoverConsoleService
service
=
createService
();
prepareForNotAuthenticated
();
prepareForNotAuthenticated
();
IDatamoverConsoleService
service
=
createService
();
try
try
{
{
...
@@ -463,6 +479,9 @@ public class DatamoverConsolerServiceTest
...
@@ -463,6 +479,9 @@ public class DatamoverConsolerServiceTest
context
.
checking
(
new
Expectations
()
context
.
checking
(
new
Expectations
()
{
{
{
{
one
(
dm1
).
check
();
one
(
dm2
).
check
();
one
(
requestContextProvider
).
getHttpServletRequest
();
one
(
requestContextProvider
).
getHttpServletRequest
();
will
(
returnValue
(
request
));
will
(
returnValue
(
request
));
...
@@ -477,6 +496,9 @@ public class DatamoverConsolerServiceTest
...
@@ -477,6 +496,9 @@ public class DatamoverConsolerServiceTest
context
.
checking
(
new
Expectations
()
context
.
checking
(
new
Expectations
()
{
{
{
{
one
(
dm1
).
check
();
one
(
dm2
).
check
();
one
(
requestContextProvider
).
getHttpServletRequest
();
one
(
requestContextProvider
).
getHttpServletRequest
();
will
(
returnValue
(
request
));
will
(
returnValue
(
request
));
...
...
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