-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:/RA-44 add integration tests (#121)
* feat: RA-44 add asserts in BlockIntTest * feat: RA-44 rm poolDeposit from BlockTx* mappers * feat: RA-44 add test to InputToOperation * feat: RA-44 fix todos * feat: RA-44 fix merge compile errors * feat: RA-44 fix rm validate tests * feat: RA-44 refactor after compile error * feat: RA-44 order test owners * feat: RA-44 add comment
- Loading branch information
Showing
20 changed files
with
195 additions
and
135 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
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
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
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
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
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
17 changes: 17 additions & 0 deletions
17
api/src/test/java/org/cardanofoundation/rosetta/api/BaseMapperTest.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,18 +1,35 @@ | ||
package org.cardanofoundation.rosetta.api; | ||
|
||
import java.math.BigInteger; | ||
|
||
import org.springframework.boot.test.mock.mockito.MockBean; | ||
import org.springframework.test.context.ContextConfiguration; | ||
import org.springframework.test.context.junit.jupiter.SpringExtension; | ||
|
||
import org.mockito.Mock; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
|
||
import org.cardanofoundation.rosetta.ConfigurationMapper; | ||
import org.cardanofoundation.rosetta.api.block.model.domain.ProtocolParams; | ||
import org.cardanofoundation.rosetta.common.services.ProtocolParamService; | ||
|
||
import static org.mockito.Mockito.when; | ||
|
||
@ExtendWith(SpringExtension.class) | ||
@ContextConfiguration(classes = {ConfigurationMapper.class, SpringMappersTestConfig.class}) | ||
public class BaseMapperTest { | ||
@MockBean | ||
protected ProtocolParamService protocolParamService; | ||
|
||
@Mock | ||
ProtocolParams protocolParams; | ||
|
||
@BeforeEach | ||
public void before() { | ||
when(protocolParamService.getProtocolParameters()).thenReturn(protocolParams); | ||
when(protocolParams.getPoolDeposit()).thenReturn(new BigInteger("500")); | ||
} | ||
} | ||
|
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
Oops, something went wrong.