Skip to content

Commit

Permalink
Merge pull request #2246 from ripcurlx/fix-ignored-test-cases
Browse files Browse the repository at this point in the history
Fix ignored tests
  • Loading branch information
ManfredKarrer authored Jan 11, 2019
2 parents ce988eb + fe86472 commit 6e753a2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
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

0 comments on commit 6e753a2

Please sign in to comment.