package info.bitrich.xchangestream.kraken;

import org.junit.Assert;
import org.junit.Test;

public class KrakenStreamingServiceTest {

    @Test
    public void testParseOrderbookSizeReturnsDefaultOnInvalidValue() {
        Assert.assertEquals(null, KrakenStreamingService.parseOrderBookSize(new Object[]{"22"}));
        Assert.assertEquals(null, KrakenStreamingService.parseOrderBookSize(new Object[]{22}));
    }

    @Test
    public void testParseOrderbookSizeReturnsCorrectValue() {
        Assert.assertEquals(100, (int)KrakenStreamingService.parseOrderBookSize(new Object[]{100}));
    }

    @Test
    public void testParseOrderbookSizeReturnsDefaultWhenNoArgsGiven() {
        Assert.assertEquals((Integer)KrakenStreamingService.ORDER_BOOK_SIZE_DEFAULT,KrakenStreamingService.parseOrderBookSize(new Object[]{}));
    }

}
@@ -328,36 +328,87 @@
 rt.assertEquals(
-null
+(Integer)KrakenStreamingService.ORDER_BOOK_SIZE_DEFAULT
 , KrakenStreamin
@@ -756,63 +756,12 @@
 als(
-(Integer)KrakenStreamingService.ORDER_BOOK_SIZE_DEFAULT
+null
 ,Kra
@@ -824,9 +824,10 @@
 %0A    %7D%0A%0A
+%0A
 %7D

fix broken unit test