-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed tests configuration for entity manager
- Loading branch information
Showing
5 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
...g/cardanofoundation/tokenmetadata/registry/api/TokenMetadataRegistryApplicationTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
package org.cardanofoundation.tokenmetadata.registry.api; | ||
|
||
import jakarta.persistence.EntityManager; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.boot.test.autoconfigure.jdbc.JdbcTest; | ||
import org.springframework.boot.test.mock.mockito.MockBean; | ||
import org.springframework.test.context.ActiveProfiles; | ||
|
||
@JdbcTest | ||
@ActiveProfiles("test") | ||
class TokenMetadataRegistryApplicationTests { | ||
@Test | ||
void contextLoads() {} | ||
|
||
@MockBean | ||
private EntityManager entityManager; | ||
|
||
@Test | ||
void contextLoads() { | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...ain/java/org/cardanofoundation/tokenmetadata/registry/repository/TokenLogoRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package org.cardanofoundation.tokenmetadata.registry.repository; | ||
|
||
import org.cardanofoundation.tokenmetadata.registry.entity.TokenLogo; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
@Profile("!test") | ||
public interface TokenLogoRepository extends JpaRepository<TokenLogo, String> { | ||
|
||
} |
2 changes: 2 additions & 0 deletions
2
...java/org/cardanofoundation/tokenmetadata/registry/repository/TokenMetadataRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package org.cardanofoundation.tokenmetadata.registry.repository; | ||
|
||
import org.cardanofoundation.tokenmetadata.registry.entity.TokenMetadata; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
@Profile("!test") | ||
public interface TokenMetadataRepository extends JpaRepository<TokenMetadata, String> { | ||
|
||
} |