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
b9d446db
Commit
b9d446db
authored
14 years ago
by
cramakri
Browse files
Options
Downloads
Patches
Plain Diff
LMS-1544 Fixed tests.
SVN: 16145
parent
a998749f
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/shared/AbstractServerTestCase.java
+10
-7
10 additions, 7 deletions
...x/cisd/openbis/generic/shared/AbstractServerTestCase.java
with
10 additions
and
7 deletions
openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerTestCase.java
+
10
−
7
View file @
b9d446db
...
@@ -47,6 +47,7 @@ import ch.systemsx.cisd.openbis.generic.server.business.bo.ISampleBO;
...
@@ -47,6 +47,7 @@ import ch.systemsx.cisd.openbis.generic.server.business.bo.ISampleBO;
import
ch.systemsx.cisd.openbis.generic.server.business.bo.IVocabularyBO
;
import
ch.systemsx.cisd.openbis.generic.server.business.bo.IVocabularyBO
;
import
ch.systemsx.cisd.openbis.generic.server.business.bo.datasetlister.IDatasetLister
;
import
ch.systemsx.cisd.openbis.generic.server.business.bo.datasetlister.IDatasetLister
;
import
ch.systemsx.cisd.openbis.generic.server.business.bo.materiallister.IMaterialLister
;
import
ch.systemsx.cisd.openbis.generic.server.business.bo.materiallister.IMaterialLister
;
import
ch.systemsx.cisd.openbis.generic.server.business.bo.samplelister.ISampleLister
;
import
ch.systemsx.cisd.openbis.generic.server.dataaccess.IAttachmentDAO
;
import
ch.systemsx.cisd.openbis.generic.server.dataaccess.IAttachmentDAO
;
import
ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory
;
import
ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory
;
import
ch.systemsx.cisd.openbis.generic.server.dataaccess.IDataSetTypeDAO
;
import
ch.systemsx.cisd.openbis.generic.server.dataaccess.IDataSetTypeDAO
;
...
@@ -166,6 +167,8 @@ public abstract class AbstractServerTestCase extends AssertJUnit
...
@@ -166,6 +167,8 @@ public abstract class AbstractServerTestCase extends AssertJUnit
protected
IDataStoreDAO
dataStoreDAO
;
protected
IDataStoreDAO
dataStoreDAO
;
protected
ISampleLister
sampleLister
;
@BeforeMethod
@BeforeMethod
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
public
void
setUp
()
public
void
setUp
()
...
@@ -206,6 +209,7 @@ public abstract class AbstractServerTestCase extends AssertJUnit
...
@@ -206,6 +209,7 @@ public abstract class AbstractServerTestCase extends AssertJUnit
externalDataBO
=
context
.
mock
(
IExternalDataBO
.
class
);
externalDataBO
=
context
.
mock
(
IExternalDataBO
.
class
);
// Table
// Table
externalDataTable
=
context
.
mock
(
IExternalDataTable
.
class
);
externalDataTable
=
context
.
mock
(
IExternalDataTable
.
class
);
sampleLister
=
context
.
mock
(
ISampleLister
.
class
);
datasetLister
=
context
.
mock
(
IDatasetLister
.
class
);
datasetLister
=
context
.
mock
(
IDatasetLister
.
class
);
experimentTable
=
context
.
mock
(
IExperimentTable
.
class
);
experimentTable
=
context
.
mock
(
IExperimentTable
.
class
);
propertyTypeTable
=
context
.
mock
(
IPropertyTypeTable
.
class
);
propertyTypeTable
=
context
.
mock
(
IPropertyTypeTable
.
class
);
...
@@ -270,7 +274,7 @@ public abstract class AbstractServerTestCase extends AssertJUnit
...
@@ -270,7 +274,7 @@ public abstract class AbstractServerTestCase extends AssertJUnit
}
}
});
});
}
}
protected
void
prepareRegisterPerson
()
protected
void
prepareRegisterPerson
()
{
{
context
.
checking
(
new
Expectations
()
context
.
checking
(
new
Expectations
()
...
@@ -278,22 +282,22 @@ public abstract class AbstractServerTestCase extends AssertJUnit
...
@@ -278,22 +282,22 @@ public abstract class AbstractServerTestCase extends AssertJUnit
{
{
one
(
personDAO
).
listByCodes
(
Arrays
.
asList
(
CommonTestUtils
.
USER_ID
));
one
(
personDAO
).
listByCodes
(
Arrays
.
asList
(
CommonTestUtils
.
USER_ID
));
will
(
returnValue
(
new
ArrayList
<
PersonPE
>()));
will
(
returnValue
(
new
ArrayList
<
PersonPE
>()));
final
String
applicationToken
=
"application-token"
;
final
String
applicationToken
=
"application-token"
;
one
(
authenticationService
).
authenticateApplication
();
one
(
authenticationService
).
authenticateApplication
();
will
(
returnValue
(
applicationToken
));
will
(
returnValue
(
applicationToken
));
final
PersonPE
systemPerson
=
createSystemUser
();
final
PersonPE
systemPerson
=
createSystemUser
();
one
(
personDAO
).
tryFindPersonByUserId
(
PersonPE
.
SYSTEM_USER_ID
);
one
(
personDAO
).
tryFindPersonByUserId
(
PersonPE
.
SYSTEM_USER_ID
);
will
(
returnValue
(
systemPerson
));
will
(
returnValue
(
systemPerson
));
one
(
authenticationService
).
getPrincipal
(
applicationToken
,
one
(
authenticationService
).
getPrincipal
(
applicationToken
,
CommonTestUtils
.
USER_ID
);
CommonTestUtils
.
USER_ID
);
will
(
returnValue
(
PRINCIPAL
));
will
(
returnValue
(
PRINCIPAL
));
final
PersonPE
person
=
CommonTestUtils
.
createPersonFromPrincipal
(
PRINCIPAL
);
final
PersonPE
person
=
CommonTestUtils
.
createPersonFromPrincipal
(
PRINCIPAL
);
person
.
setDisplaySettings
(
systemPerson
.
getDisplaySettings
());
person
.
setDisplaySettings
(
systemPerson
.
getDisplaySettings
());
one
(
personDAO
).
createPerson
(
with
(
new
PersonWithDisplaySettingsMatcher
(
person
)));
one
(
personDAO
).
createPerson
(
with
(
new
PersonWithDisplaySettingsMatcher
(
person
)));
}
}
});
});
...
@@ -313,7 +317,6 @@ public abstract class AbstractServerTestCase extends AssertJUnit
...
@@ -313,7 +317,6 @@ public abstract class AbstractServerTestCase extends AssertJUnit
return
new
DisplaySettings
();
return
new
DisplaySettings
();
}
}
static
final
protected
ExperimentPE
createExperiment
(
final
String
experimentTypeCode
,
static
final
protected
ExperimentPE
createExperiment
(
final
String
experimentTypeCode
,
final
String
experimentCode
,
final
String
groupCode
)
final
String
experimentCode
,
final
String
groupCode
)
{
{
...
...
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