Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xta-client-lib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
lib
xta-client-lib
Commits
0a1fae58
Commit
0a1fae58
authored
6 months ago
by
Jan Zickermann
Browse files
Options
Downloads
Patches
Plain Diff
OZG-6891 Cleanup
parent
c3d1baa8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/java/de/ozgcloud/xta/client/XtaClientTest.java
+2
-1
2 additions, 1 deletion
src/test/java/de/ozgcloud/xta/client/XtaClientTest.java
src/test/java/de/ozgcloud/xta/client/core/XtaExceptionHandlerTest.java
+4
-4
4 additions, 4 deletions
.../de/ozgcloud/xta/client/core/XtaExceptionHandlerTest.java
with
6 additions
and
5 deletions
src/test/java/de/ozgcloud/xta/client/XtaClientTest.java
+
2
−
1
View file @
0a1fae58
...
@@ -753,9 +753,10 @@ class XtaClientTest {
...
@@ -753,9 +753,10 @@ class XtaClientTest {
@DisplayName
(
"should throw exception if service not available"
)
@DisplayName
(
"should throw exception if service not available"
)
@Test
@Test
void
shouldThrowExceptionIfServiceNotAvailable
()
{
void
shouldThrowExceptionIfServiceNotAvailable
()
{
var
metaData
=
message
.
metaData
();
doReturn
(
false
).
when
(
service
).
lookupService
(
message
.
metaData
());
doReturn
(
false
).
when
(
service
).
lookupService
(
message
.
metaData
());
assertThatThrownBy
(()
->
client
.
throwExceptionIfServiceNotAvailable
(
message
.
metaData
()
))
assertThatThrownBy
(()
->
client
.
throwExceptionIfServiceNotAvailable
(
metaData
))
.
isInstanceOf
(
XtaClientRuntimeException
.
class
);
.
isInstanceOf
(
XtaClientRuntimeException
.
class
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/test/java/de/ozgcloud/xta/client/core/XtaExceptionHandlerTest.java
+
4
−
4
View file @
0a1fae58
...
@@ -82,9 +82,9 @@ class XtaExceptionHandlerTest {
...
@@ -82,9 +82,9 @@ class XtaExceptionHandlerTest {
@DisplayName
(
"should keep message if no cause"
)
@DisplayName
(
"should keep message if no cause"
)
@Test
@Test
void
shouldKeepMessageIfNoCause
()
{
void
shouldKeepMessageIfNoCause
()
{
var
exception
=
new
XtaClientRuntimeException
(
MESSAGE
);
var
exception
WithoutCause
=
new
XtaClientRuntimeException
(
MESSAGE
);
var
result
=
exceptionHandler
.
deriveXtaClientExceptionFromClientRuntimeException
(
exception
);
var
result
=
exceptionHandler
.
deriveXtaClientExceptionFromClientRuntimeException
(
exception
WithoutCause
);
assertThat
(
result
.
getMessage
()).
isEqualTo
(
MESSAGE
);
assertThat
(
result
.
getMessage
()).
isEqualTo
(
MESSAGE
);
}
}
...
@@ -93,9 +93,9 @@ class XtaExceptionHandlerTest {
...
@@ -93,9 +93,9 @@ class XtaExceptionHandlerTest {
@Test
@Test
void
shouldKeepMessageIfCauseIsNotAnXtaException
()
{
void
shouldKeepMessageIfCauseIsNotAnXtaException
()
{
var
cause
=
new
Exception
();
var
cause
=
new
Exception
();
var
exception
=
new
XtaClientRuntimeException
(
MESSAGE
,
cause
);
var
exception
WithNoXtaCause
=
new
XtaClientRuntimeException
(
MESSAGE
,
cause
);
var
result
=
exceptionHandler
.
deriveXtaClientExceptionFromClientRuntimeException
(
exception
);
var
result
=
exceptionHandler
.
deriveXtaClientExceptionFromClientRuntimeException
(
exception
WithNoXtaCause
);
assertThat
(
result
.
getMessage
()).
isEqualTo
(
MESSAGE
);
assertThat
(
result
.
getMessage
()).
isEqualTo
(
MESSAGE
);
...
...
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