-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix build on jdk11 and jdk12. remove powermock and jmockit #3081
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9a58760
WIP remove powermock
christophsturm e9a4519
remove powermock from core.
christophsturm 17221cb
remove more powermock and jmockit tests.
christophsturm 5da7ca2
remove powermock from gradle file
christophsturm 0babe82
remove jmockit
christophsturm 0af6097
make final classes final again
christophsturm 95b6597
simplify
christophsturm 9278ad0
don't force jdk 10 on developers
christophsturm bd06d2a
document what this is for
christophsturm d5af6e5
avoid acronyms
christophsturm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
13 changes: 13 additions & 0 deletions
13
desktop/src/main/java/bisq/desktop/main/offer/MakerFeeMaker.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package bisq.desktop.main.offer; | ||
|
||
import bisq.core.btc.wallet.BsqWalletService; | ||
import bisq.core.offer.OfferUtil; | ||
import bisq.core.user.Preferences; | ||
|
||
import org.bitcoinj.core.Coin; | ||
|
||
public class MakerFeeMaker { | ||
public Coin getMakerFee(BsqWalletService bsqWalletService, Preferences preferences, Coin amount) { | ||
return OfferUtil.getMakerFee(bsqWalletService, preferences, amount); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,29 +53,15 @@ | |
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import mockit.Expectations; | ||
import mockit.Injectable; | ||
import mockit.Mock; | ||
import mockit.MockUp; | ||
import mockit.Tested; | ||
|
||
import org.junit.Before; | ||
import org.junit.Ignore; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.mockito.Mockito.mock; | ||
|
||
public class TradesChartsViewModelTest { | ||
@Tested | ||
TradesChartsViewModel model; | ||
@Injectable | ||
Preferences preferences; | ||
@Injectable | ||
PriceFeedService priceFeedService; | ||
@Injectable | ||
Navigation navigation; | ||
@Injectable | ||
BSFormatter formatter; | ||
@Injectable | ||
TradeStatisticsManager tsm; | ||
|
||
private static final Logger log = LoggerFactory.getLogger(TradesChartsViewModelTest.class); | ||
|
@@ -121,10 +107,11 @@ public class TradesChartsViewModelTest { | |
null, | ||
1 | ||
); | ||
|
||
@Before | ||
public void setup() throws IOException { | ||
|
||
tsm = mock(TradeStatisticsManager.class); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please avoid acronyms. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah that's what it was called before, will change. |
||
model = new TradesChartsViewModel(tsm, mock(Preferences.class), mock(PriceFeedService.class), | ||
mock(Navigation.class), mock(BSFormatter.class)); | ||
dir = File.createTempFile("temp_tests1", ""); | ||
//noinspection ResultOfMethodCallIgnored | ||
dir.delete(); | ||
|
@@ -168,6 +155,8 @@ public void testGetCandleData() { | |
assertEquals(isBullish, candleData.isBullish); | ||
} | ||
|
||
// TODO JMOCKIT | ||
@Ignore | ||
@Test | ||
public void testItemLists() throws ParseException { | ||
// Helper class to add historic trades | ||
|
@@ -196,12 +185,12 @@ class Trade { | |
|
||
// Set predetermined time to use as "now" during test | ||
Date test_time = dateFormat.parse("2018-01-01T00:00:05"); // Monday | ||
new MockUp<System>() { | ||
/* new MockUp<System>() { | ||
@Mock | ||
long currentTimeMillis() { | ||
return test_time.getTime(); | ||
} | ||
}; | ||
};*/ | ||
|
||
// Two trades 10 seconds apart, different YEAR, MONTH, WEEK, DAY, HOUR, MINUTE_10 | ||
trades.add(new Trade("2017-12-31T23:59:52", "1", "100", "EUR")); | ||
|
@@ -216,10 +205,10 @@ long currentTimeMillis() { | |
|
||
// Run test for each tick type | ||
for (TradesChartsViewModel.TickUnit tick : TradesChartsViewModel.TickUnit.values()) { | ||
new Expectations() {{ | ||
/* new Expectations() {{ | ||
tsm.getObservableTradeStatisticsSet(); | ||
result = tradeStats; | ||
}}; | ||
}};*/ | ||
|
||
// Trigger chart update | ||
model.setTickUnit(tick); | ||
|
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MakerFeeMaker sounds a bit weird. Maybe MakerFeeProvider?