Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse openK User Modules
org.eclipse.openk-usermodules.gridFailureInformation.backend
Commits
8291abe0
Commit
8291abe0
authored
May 07, 2020
by
dietricf
Browse files
SI-720 Natural Sortorder / Fix RabbitConnection while unittesting
parent
fb85890d
Changes
4
Hide whitespace changes
Inline
Side-by-side
gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/repository/FailureInformationRepository.java
View file @
8291abe0
...
@@ -29,9 +29,8 @@ import java.util.UUID;
...
@@ -29,9 +29,8 @@ import java.util.UUID;
@Repository
@Repository
public
interface
FailureInformationRepository
extends
PagingAndSortingRepository
<
TblFailureInformation
,
Long
>
{
public
interface
FailureInformationRepository
extends
PagingAndSortingRepository
<
TblFailureInformation
,
Long
>
{
Page
<
TblFailureInformation
>
findByTblFailureInformationCondensedIdIsNullOrderByFailureBeginDescIdAsc
(
Pageable
pageable
);
// NOSONAR
Page
<
TblFailureInformation
>
findByTblFailureInformationCondensedIdIsNull
(
Pageable
pageable
);
// NOSONAR
// _fd 03.03.2020: Name of function cannot be changed
Optional
<
TblFailureInformation
>
findByUuid
(
UUID
uuid
);
Optional
<
TblFailureInformation
>
findByUuid
(
UUID
uuid
);
List
<
TblFailureInformation
>
findByUuidIn
(
List
<
UUID
>
uuidList
);
List
<
TblFailureInformation
>
findByUuidIn
(
List
<
UUID
>
uuidList
);
...
...
gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/service/FailureInformationService.java
View file @
8291abe0
...
@@ -98,7 +98,7 @@ public class FailureInformationService {
...
@@ -98,7 +98,7 @@ public class FailureInformationService {
public
Page
<
FailureInformationDto
>
findFailureInformations
(
Pageable
pageable
)
{
public
Page
<
FailureInformationDto
>
findFailureInformations
(
Pageable
pageable
)
{
Page
<
FailureInformationDto
>
retPage
=
failureInformationRepository
Page
<
FailureInformationDto
>
retPage
=
failureInformationRepository
.
findByTblFailureInformationCondensedIdIsNull
(
pageable
)
.
findByTblFailureInformationCondensedIdIsNull
OrderByFailureBeginDescIdAsc
(
pageable
)
.
map
(
failureInformationMapper:
:
toFailureInformationDto
);
.
map
(
failureInformationMapper:
:
toFailureInformationDto
);
retPage
.
getContent
().
forEach
(
this
::
enrichFailureInfo
);
retPage
.
getContent
().
forEach
(
this
::
enrichFailureInfo
);
...
...
gfsBackendService/src/main/resources/application.yml
View file @
8291abe0
...
@@ -69,9 +69,13 @@ email:
...
@@ -69,9 +69,13 @@ email:
spring
:
spring
:
profiles
:
test
profiles
:
test
datasource
:
datasource
:
url
:
jdbc:h2:mem:test;DB_CLOSE_DELAY=-1
url
:
jdbc:h2:mem:test;DB_CLOSE_DELAY=-1
rabbitmq
:
listener
:
simple
:
auto-startup
:
false
jpa
:
jpa
:
hibernate
:
hibernate
:
ddl-auto
:
create
ddl-auto
:
create
...
...
gfsBackendService/src/test/java/org/eclipse/openk/gridfailureinformation/service/FailureInformationServiceTest.java
View file @
8291abe0
...
@@ -78,7 +78,7 @@ public class FailureInformationServiceTest {
...
@@ -78,7 +78,7 @@ public class FailureInformationServiceTest {
//TblStation tblStation = MockDataHelper.mockTblStation();
//TblStation tblStation = MockDataHelper.mockTblStation();
//List<TblAddress> addressList = MockDataHelper.mockTblAddressList();
//List<TblAddress> addressList = MockDataHelper.mockTblAddressList();
when
(
failureInformationRepository
.
findByTblFailureInformationCondensedIdIsNull
(
any
(
Pageable
.
class
))).
thenReturn
(
mockfailurePage
);
when
(
failureInformationRepository
.
findByTblFailureInformationCondensedIdIsNull
OrderByFailureBeginDescIdAsc
(
any
(
Pageable
.
class
))).
thenReturn
(
mockfailurePage
);
//when(stationRepository.findByStationId(anyString())).thenReturn(Optional.of(tblStation));
//when(stationRepository.findByStationId(anyString())).thenReturn(Optional.of(tblStation));
//when(addressRepository.findByStationId(anyString())).thenReturn(addressList);
//when(addressRepository.findByStationId(anyString())).thenReturn(addressList);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment