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
9be62f28
Commit
9be62f28
authored
12 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
fixing ETLServiceTest in context with meta projects
SVN: 27321
parent
0258a421
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
openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java
+20
-2
20 additions, 2 deletions
.../systemsx/cisd/openbis/generic/server/ETLServiceTest.java
with
20 additions
and
2 deletions
openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java
+
20
−
2
View file @
9be62f28
...
...
@@ -152,6 +152,8 @@ public class ETLServiceTest extends AbstractServerTestCase
private
ISessionManager
<
Session
>
sessionManagerForEntityOperations
;
private
PersonPE
sessionPerson
;
@Override
@BeforeMethod
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -167,6 +169,8 @@ public class ETLServiceTest extends AbstractServerTestCase
conversationServer
=
context
.
mock
(
IServiceConversationServerManagerLocal
.
class
);
sessionManagerForEntityOperations
=
context
.
mock
(
ISessionManager
.
class
,
"sessionManagerForEntityOperations"
);
sessionPerson
=
new
PersonPE
();
session
.
setPerson
(
sessionPerson
);
}
@Test
...
...
@@ -480,7 +484,7 @@ public class ETLServiceTest extends AbstractServerTestCase
new
SampleIdentifier
(
new
DatabaseInstanceIdentifier
(
"DB"
),
"S1"
);
SamplePE
samplePE
=
createSample
();
prepareTryToLoadSample
(
sampleIdentifier
,
samplePE
);
prepareTryToLoadSample
WithMetaProjects
(
sampleIdentifier
,
samplePE
);
Sample
actualSample
=
createService
().
tryGetSampleWithExperiment
(
SESSION_TOKEN
,
sampleIdentifier
);
...
...
@@ -497,7 +501,7 @@ public class ETLServiceTest extends AbstractServerTestCase
new
SampleIdentifier
(
new
DatabaseInstanceIdentifier
(
"DB"
),
"S1"
);
final
ExperimentPE
experiment
=
createExperiment
(
"TYPE"
,
"EXP1"
,
"G1"
);
SamplePE
sample
=
createSampleWithExperiment
(
experiment
);
prepareTryToLoadSample
(
sampleIdentifier
,
sample
);
prepareTryToLoadSample
WithMetaProjects
(
sampleIdentifier
,
sample
);
Sample
actualSample
=
createService
().
tryGetSampleWithExperiment
(
SESSION_TOKEN
,
sampleIdentifier
);
...
...
@@ -991,6 +995,8 @@ public class ETLServiceTest extends AbstractServerTestCase
allowing
(
daoFactory
).
getPersistencyResources
();
will
(
returnValue
(
new
PersistencyResources
(
null
,
null
,
null
,
null
)));
one
(
metaprojectDAO
).
listMetaprojectsForEntity
(
sessionPerson
,
samplePE
);
}
});
...
...
@@ -1362,6 +1368,18 @@ public class ETLServiceTest extends AbstractServerTestCase
return
sample
;
}
private
void
prepareTryToLoadSampleWithMetaProjects
(
final
SampleIdentifier
identifier
,
final
SamplePE
sample
)
{
prepareTryToLoadSample
(
session
,
identifier
,
sample
);
context
.
checking
(
new
Expectations
()
{
{
one
(
metaprojectDAO
).
listMetaprojectsForEntity
(
sessionPerson
,
sample
);
}
});
}
private
void
prepareTryToLoadSample
(
final
SampleIdentifier
identifier
,
final
SamplePE
sample
)
{
prepareTryToLoadSample
(
session
,
identifier
,
sample
);
...
...
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