Skip to content
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 ignored tests #2246

Merged
merged 2 commits into from
Jan 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,13 @@ configure(project(':desktop')) {
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
}

test {
systemProperty 'jdk.attach.allowAttachSelf', true

def jmockit = configurations.testCompile.files.find { it.name.contains("jmockit") }.absolutePath
jvmArgs "-javaagent:$jmockit"
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,10 @@
import mockit.Tested;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

//TODO @Christoph Can you have a look why JMockit is nto working anymore in that module?
@Ignore
public class TradesChartsViewModelTest {
@Tested
TradesChartsViewModel model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ public void testMaxCharactersForPriceDistance() {
assertEquals(10, model.maxPlacesForMarketPriceMargin.intValue()); //" (-10.00%)"
}

@Ignore
@Test
public void testGetPrice() {
OfferBook offerBook = mock(OfferBook.class);
Expand Down Expand Up @@ -435,10 +434,10 @@ public void testGetPrice() {
model.activate();

assertEquals("12557.2046 (1.00%)", model.getPrice(lowItem));
assertEquals(" 10.0000 ", model.getPrice(fixedItem));
assertEquals("10.0000", model.getPrice(fixedItem));
offerBookListItems.addAll(item);
assertEquals("14206.1304 (-12.00%)", model.getPrice(item));
assertEquals("12557.2046 (1.00%)", model.getPrice(lowItem));
assertEquals("12557.2046 (1.00%)", model.getPrice(lowItem));


}
Expand Down
4 changes: 1 addition & 3 deletions desktop/src/test/java/bisq/desktop/util/BSFormatterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.powermock.modules.junit4.PowerMockRunner;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

Expand Down Expand Up @@ -180,15 +179,14 @@ public void testFormatAmountWithAlignmenWithDecimals() {
assertEquals("0.1000 - 0.2000", formatter.formatAmount(offer, 4, true, 15));
}

@Ignore
@Test
public void testFormatAmountWithAlignmenWithDecimalsNoRange() {
OfferPayload offerPayload = mock(OfferPayload.class);
Offer offer = new Offer(offerPayload);
when(offerPayload.getMinAmount()).thenReturn(10000000L);
when(offerPayload.getAmount()).thenReturn(10000000L);

assertEquals(" 0.1000", formatter.formatAmount(offer, 4, true, 15));
assertEquals("0.1000", formatter.formatAmount(offer, 4, true, 15));
}

@Test
Expand Down