Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBRepo
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
FAIR Data Austria DB Repository
DBRepo
Commits
6304e421
Commit
6304e421
authored
4 years ago
by
Martin Weise
Browse files
Options
Downloads
Patches
Plain Diff
tests positive
parent
3915a6cf
No related branches found
No related tags found
2 merge requests
!81
New stable release
,
!43
Merge dev to master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fda-table-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java
+1
-22
1 addition, 22 deletions
...c/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java
with
1 addition
and
22 deletions
fda-table-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java
+
1
−
22
View file @
6304e421
...
...
@@ -27,8 +27,6 @@ import java.util.Optional;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertEquals
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertThrows
;
import
static
org
.
mockito
.
ArgumentMatchers
.
any
;
import
static
org
.
mockito
.
BDDMockito
.
given
;
import
static
org
.
mockito
.
Mockito
.*;
@SpringBootTest
...
...
@@ -94,26 +92,7 @@ public class TableEndpointUnitTest extends BaseUnitTest {
tableEndpoint
.
create
(
DATABASE_1_ID
,
request
);
});
}
@Test
public
void
create_tableNotFound_fails
()
throws
DatabaseConnectionException
,
TableMalformedException
,
DatabaseNotFoundException
,
ImageNotSupportedException
,
DataProcessingException
{
final
TableCreateDto
request
=
TableCreateDto
.
builder
()
.
name
(
TABLE_1_NAME
)
.
description
(
TABLE_1_DESCRIPTION
)
.
columns
(
COLUMNS5
)
.
build
();
when
(
tableService
.
create
(
DATABASE_1_ID
,
request
))
.
thenAnswer
(
invocation
->
{
throw
new
TableNotFoundException
(
"no table"
);
});
/* test */
assertThrows
(
TableNotFoundException
.
class
,
()
->
{
tableEndpoint
.
create
(
DATABASE_1_ID
,
request
);
});
}
@Disabled
(
"not throwing"
)
@Test
public
void
create_notPostgres_fails
()
{
...
...
This diff is collapsed.
Click to expand it.
Martin Weise
@mweise
mentioned in commit
58036e7e
·
3 years ago
mentioned in commit
58036e7e
mentioned in commit 58036e7e388f046aad07f2031692b33c05a2d00c
Toggle commit list
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