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
2f593bda
Commit
2f593bda
authored
14 years ago
by
buczekp
Browse files
Options
Downloads
Patches
Plain Diff
[LMS-1507] fixed bo test
SVN: 15684
parent
140bf425
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/business/bo/ExternalDataTableTest.java
+8
-32
8 additions, 32 deletions
...bis/generic/server/business/bo/ExternalDataTableTest.java
with
8 additions
and
32 deletions
openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataTableTest.java
+
8
−
32
View file @
2f593bda
...
@@ -562,11 +562,10 @@ public final class ExternalDataTableTest extends AbstractBOTest
...
@@ -562,11 +562,10 @@ public final class ExternalDataTableTest extends AbstractBOTest
{
{
prepareFindFullDatasets
(
allDataSets
,
false
,
true
);
prepareFindFullDatasets
(
allDataSets
,
false
,
true
);
prepareUpdateDatasetStatus
(
d2Available1
,
ARCHIVE_PENDING
);
prepareUpdateDatasetStatuses
(
new
ExternalDataPE
[]
prepareUpdateDatasetStatus
(
d2Available2
,
ARCHIVE_PENDING
);
{
d2Available1
,
d2Available2
,
d3Available
},
ARCHIVE_PENDING
);
prepareUpdateDatasetStatus
(
d3Available
,
ARCHIVE_PENDING
);
prepareFlush
();
//
prepareFlush();
prepareArchiving
(
dataStoreService2
,
dss2
,
d2Available1
,
d2Available2
);
prepareArchiving
(
dataStoreService2
,
dss2
,
d2Available1
,
d2Available2
);
prepareArchiving
(
dataStoreService3
,
dss3
,
d3Available
);
prepareArchiving
(
dataStoreService3
,
dss3
,
d3Available
);
...
@@ -601,11 +600,8 @@ public final class ExternalDataTableTest extends AbstractBOTest
...
@@ -601,11 +600,8 @@ public final class ExternalDataTableTest extends AbstractBOTest
{
{
prepareFindFullDatasets
(
allDataSets
,
false
,
true
);
prepareFindFullDatasets
(
allDataSets
,
false
,
true
);
prepareUpdateDatasetStatus
(
d2Archived1
,
UNARCHIVE_PENDING
);
prepareUpdateDatasetStatuses
(
new
ExternalDataPE
[]
prepareUpdateDatasetStatus
(
d2Archived2
,
UNARCHIVE_PENDING
);
{
d2Archived1
,
d2Archived2
,
d3Archived
},
UNARCHIVE_PENDING
);
prepareUpdateDatasetStatus
(
d3Archived
,
UNARCHIVE_PENDING
);
prepareFlush
();
prepareUnarchiving
(
dataStoreService2
,
dss2
,
d2Archived1
,
d2Archived2
);
prepareUnarchiving
(
dataStoreService2
,
dss2
,
d2Archived1
,
d2Archived2
);
prepareUnarchiving
(
dataStoreService3
,
dss3
,
d3Archived
);
prepareUnarchiving
(
dataStoreService3
,
dss3
,
d3Archived
);
...
@@ -621,34 +617,14 @@ public final class ExternalDataTableTest extends AbstractBOTest
...
@@ -621,34 +617,14 @@ public final class ExternalDataTableTest extends AbstractBOTest
context
.
assertIsSatisfied
();
context
.
assertIsSatisfied
();
}
}
private
void
prepareUpdateDatasetStatus
(
final
ExternalDataPE
dataSet
,
private
void
prepareUpdateDatasetStatus
es
(
final
ExternalDataPE
[]
dataSet
s
,
final
DataSetArchivingStatus
newStatus
)
final
DataSetArchivingStatus
newStatus
)
{
{
context
.
checking
(
new
Expectations
()
context
.
checking
(
new
Expectations
()
{
{
{
{
one
(
externalDataDAO
).
updateDataSetStatuses
(
one
(
externalDataDAO
).
validate
(
with
(
new
BaseMatcher
<
ExternalDataPE
>()
Code
.
extractCodes
(
Arrays
.
asList
(
dataSets
)),
newStatus
);
{
public
boolean
matches
(
Object
item
)
{
if
(
item
instanceof
ExternalDataPE
)
{
ExternalDataPE
actualDataSet
=
(
ExternalDataPE
)
item
;
return
dataSet
.
equals
(
actualDataSet
)
&&
newStatus
==
actualDataSet
.
getStatus
();
}
return
false
;
}
public
void
describeTo
(
Description
description
)
{
description
.
appendValue
(
"Dataset "
+
dataSet
.
getCode
()
+
" with status "
+
newStatus
);
}
}));
}
}
});
});
}
}
...
...
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