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
2b6c4eca
Commit
2b6c4eca
authored
14 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
LMS-1870 make tests more robust against different environments
SVN: 18679
parent
0278a1d3
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
screening/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/images/ImageChannelsUtilsTest.java
+9
-6
9 additions, 6 deletions
...bis/dss/generic/server/images/ImageChannelsUtilsTest.java
with
9 additions
and
6 deletions
screening/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/images/ImageChannelsUtilsTest.java
+
9
−
6
View file @
2b6c4eca
...
@@ -150,7 +150,7 @@ public class ImageChannelsUtilsTest extends AssertJUnit
...
@@ -150,7 +150,7 @@ public class ImageChannelsUtilsTest extends AssertJUnit
}
}
@Test
@Test
public
void
testGet
Gif
ImageAsPngThumbnail
()
public
void
testGet
Jpg
ImageAsPngThumbnail
()
{
{
final
TileImageReference
imageRef
=
new
TileImageReference
();
final
TileImageReference
imageRef
=
new
TileImageReference
();
imageRef
.
setChannel
(
CHANNEL
);
imageRef
.
setChannel
(
CHANNEL
);
...
@@ -162,14 +162,14 @@ public class ImageChannelsUtilsTest extends AssertJUnit
...
@@ -162,14 +162,14 @@ public class ImageChannelsUtilsTest extends AssertJUnit
{
{
one
(
loader
)
one
(
loader
)
.
tryGetImage
(
imageRef
.
getChannel
(),
imageRef
.
getChannelStack
(),
null
);
.
tryGetImage
(
imageRef
.
getChannel
(),
imageRef
.
getChannelStack
(),
null
);
will
(
returnValue
(
new
AbsoluteImageReference
(
image
(
"img1.
gif
"
),
"id42"
,
null
,
will
(
returnValue
(
new
AbsoluteImageReference
(
image
(
"img1.
jpg
"
),
"id42"
,
null
,
null
,
new
Size
(
4
,
2
))));
null
,
new
Size
(
4
,
2
))));
}
}
});
});
IContent
image
=
ImageChannelsUtils
.
getImage
(
loader
,
imageRef
);
IContent
image
=
ImageChannelsUtils
.
getImage
(
loader
,
imageRef
);
assertPNG
(
image
);
assertPNG
(
image
);
assertEquals
(
"c
3dce6 c2dce5\nc3dce6 c3dce6
\n"
,
getImageContentDescription
(
image
));
assertEquals
(
"c
de cde\ncde cde
\n"
,
getImageContentDescription
(
image
));
context
.
assertIsSatisfied
();
context
.
assertIsSatisfied
();
}
}
...
@@ -200,8 +200,8 @@ public class ImageChannelsUtilsTest extends AssertJUnit
...
@@ -200,8 +200,8 @@ public class ImageChannelsUtilsTest extends AssertJUnit
IContent
image
=
ImageChannelsUtils
.
getImage
(
loader
,
imageRef
);
IContent
image
=
ImageChannelsUtils
.
getImage
(
loader
,
imageRef
);
assertPNG
(
image
);
assertPNG
(
image
);
assertEquals
(
"e
500
00 f00
000
f00
000 e400
00\n"
+
"f
200
00 c
f00
00 c
f00
00 f00
000
\n"
assertEquals
(
"e00 f00 f00
e
00\n"
+
"f00 c00 c00 f00\n"
+
"f00
000 cf00
00 c
f00
00 f00
000
\n"
+
"e
500
00 f00
000
f00
000 e500
00\n"
,
+
"f00
c
00 c00 f00\n"
+
"e00 f00 f00
e
00\n"
,
getImageContentDescription
(
image
));
getImageContentDescription
(
image
));
context
.
assertIsSatisfied
();
context
.
assertIsSatisfied
();
...
@@ -246,7 +246,10 @@ public class ImageChannelsUtilsTest extends AssertJUnit
...
@@ -246,7 +246,10 @@ public class ImageChannelsUtilsTest extends AssertJUnit
{
{
builder
.
append
(
' '
);
builder
.
append
(
' '
);
}
}
builder
.
append
(
Integer
.
toHexString
(
pixel
).
substring
(
2
));
String
hexcode
=
Integer
.
toHexString
(
pixel
).
substring
(
2
);
builder
.
append
(
hexcode
.
charAt
(
0
));
builder
.
append
(
hexcode
.
charAt
(
2
));
builder
.
append
(
hexcode
.
charAt
(
4
));
}
}
builder
.
append
(
'\n'
);
builder
.
append
(
'\n'
);
}
}
...
...
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