Skip to content

Commit

Permalink
Finish off websocket ticker demo, update config files and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thrasher- committed Sep 14, 2017
1 parent ad7ae88 commit 913c104
Show file tree
Hide file tree
Showing 53 changed files with 676 additions and 411 deletions.
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ type ExchangeConfig struct {
AvailablePairs string
EnabledPairs string
BaseCurrencies string
AssetTypes string
ConfigCurrencyPairFormat *CurrencyPairFormatConfig `json:"ConfigCurrencyPairFormat"`
RequestCurrencyPairFormat *CurrencyPairFormatConfig `json:"RequestCurrencyPairFormat"`
}
Expand Down
25 changes: 22 additions & 3 deletions config_example.dat
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"AvailablePairs": "BTCUSD,BTCHKD,BTCEUR,BTCCAD,BTCAUD,BTCSGD,BTCJPY,BTCGBP,BTCNZD,LTCBTC,DOGEBTC,STRBTC,XRPBTC",
"EnabledPairs": "BTCUSD,BTCHKD,BTCEUR,BTCCAD,BTCAUD,BTCSGD,BTCJPY,BTCGBP,BTCNZD,LTCBTC,DOGEBTC,STRBTC,XRPBTC",
"BaseCurrencies": "USD,HKD,EUR,CAD,AUD,SGD,JPY,GBP,NZD",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true,
"Index": "BTC"
Expand All @@ -86,6 +87,7 @@
"AvailablePairs": "BTCUSD,LTCUSD,LTCBTC,ETHUSD,ETHBTC,ETCBTC,ETCUSD,RRTUSD,RRTBTC,ZECUSD,ZECBTC,XMRUSD,XMRBTC,DSHUSD,DSHBTC,BCCBTC,BCUBTC,BCCUSD,BCUUSD,XRPUSD,XRPBTC,IOTUSD,IOTBTC,IOTETH,EOSUSD,EOSBTC,EOSETH,SANUSD,SANBTC,SANETH,OMGUSD,OMGBTC,OMGETH,BCHUSD,BCHBTC,BCHETH",
"EnabledPairs": "BTCUSD,LTCUSD,LTCBTC,ETHUSD,ETHBTC",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -106,6 +108,7 @@
"AvailablePairs": "BTCUSD,BTCEUR,EURUSD,XRPUSD,XRPEUR",
"EnabledPairs": "BTCUSD,BTCEUR,EURUSD,XRPUSD,XRPEUR",
"BaseCurrencies": "USD,EUR",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -122,9 +125,10 @@
"AuthenticatedAPISupport": false,
"APIKey": "Key",
"APISecret": "Secret",
"AvailablePairs": "BTC-LTC,BTC-DOGE,BTC-VTC,BTC-PPC,BTC-FTC,BTC-RDD,BTC-NXT,BTC-DASH,BTC-POT,BTC-BLK,BTC-XMY,BTC-AUR,BTC-EFL,BTC-GLD,BTC-SLR,BTC-PTC,BTC-GRS,BTC-NLG,BTC-RBY,BTC-XWC,BTC-MONA,BTC-THC,BTC-ENRG,BTC-ERC,BTC-NAUT,BTC-VRC,BTC-CURE,BTC-XBB,BTC-XMR,BTC-CLOAK,BTC-START,BTC-KORE,BTC-XDN,BTC-TRUST,BTC-NAV,BTC-XST,BTC-BTCD,BTC-VIA,BTC-UNO,BTC-PINK,BTC-IOC,BTC-CANN,BTC-SYS,BTC-NEOS,BTC-DGB,BTC-BURST,BTC-EXCL,BTC-SWIFT,BTC-DOPE,BTC-BLOCK,BTC-ABY,BTC-BYC,BTC-XMG,BTC-BLITZ,BTC-BAY,BTC-BTS,BTC-FAIR,BTC-SPR,BTC-VTR,BTC-XRP,BTC-GAME,BTC-COVAL,BTC-NXS,BTC-XCP,BTC-BITB,BTC-GEO,BTC-FLDC,BTC-GRC,BTC-FLO,BTC-NBT,BTC-MUE,BTC-XEM,BTC-CLAM,BTC-DMD,BTC-GAM,BTC-SPHR,BTC-OK,BTC-SNRG,BTC-PKB,BTC-CPC,BTC-AEON,BTC-ETH,BTC-GCR,BTC-TX,BTC-BCY,BTC-EXP,BTC-INFX,BT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H-LGD,BTC-PTOY,ETH-PTOY,BTC-MYST,ETH-MYST,BTC-CFI,ETH-CFI,BTC-BNT,ETH-BNT,BTC-NMR,ETH-NMR,ETH-TIME,ETH-LTC,ETH-XRP,BTC-SNT,ETH-SNT,BTC-DCT,BTC-XEL,BTC-MCO,ETH-MCO,BTC-ADT,ETH-ADT,BTC-FUN,ETH-FUN,BTC-PAY,ETH-PAY,BTC-MTL,ETH-MTL,BTC-STORJ,ETH-STORJ,BTC-ADX,ETH-ADX,ETH-DASH,ETH-SC,ETH-ZEC,USDT-ZEC,USDT-LTC,USDT-ETC,USDT-XRP,BTC-OMG,ETH-OMG,BTC-CVC,ETH-CVC,BTC-PART,BTC-QTUM,ETH-QTUM,ETH-XMR,ETH-XEM,ETH-XLM,ETH-NEO,USDT-XMR,USDT-DASH,ETH-BCC,USDT-BCC,BTC-BCC,USDT-NEO,ETH-WAVES,ETH-STRAT,ETH-DGB,ETH-FCT,ETH-BTS",
"EnabledPairs": "USDT-BTC",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true,
"Delimiter": "-"
Expand All @@ -146,6 +150,7 @@
"AvailablePairs": "BTCCNY,LTCCNY,LTCBTC",
"EnabledPairs": "BTCCNY,LTCCNY,LTCBTC",
"BaseCurrencies": "CNY",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -165,6 +170,7 @@
"AvailablePairs": "BTCUSD,BTCRUR,BTCEUR,LTCBTC,LTCUSD,LTCRUR,LTCEUR,NMCBTC,NMCUSD,NVCBTC,NVCUSD,USDRUR,EURUSD,EURRUR,PPCBTC,PPCUSD",
"EnabledPairs": "BTCUSD,BTCRUR,BTCEUR,LTCBTC,LTCUSD,LTCRUR,LTCEUR,NMCBTC,NMCUSD,NVCBTC,NVCUSD,USDRUR,EURUSD,EURRUR,PPCBTC,PPCUSD",
"BaseCurrencies": "USD,RUR,EUR",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -186,6 +192,7 @@
"AvailablePairs": "LTCAUD,BTCAUD",
"EnabledPairs": "LTCAUD,BTCAUD",
"BaseCurrencies": "AUD",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -206,6 +213,7 @@
"AvailablePairs": "LTCBTC,ETCBTC,ETHBTC",
"EnabledPairs": "LTCBTC,ETCBTC,ETHBTC",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -226,6 +234,7 @@
"AvailablePairs": "LTCEUR,LTCBTC,BTCGBP,BTCEUR,ETHEUR,ETHBTC,LTCUSD,BTCUSD,ETHUSD",
"EnabledPairs": "BTCUSD,BTCGBP,BTCEUR",
"BaseCurrencies": "USD,GBP,EUR",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -246,6 +255,7 @@
"AvailablePairs": "BTCUSD,ETHBTC,ETHUSD",
"EnabledPairs": "BTCUSD",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -265,6 +275,7 @@
"AvailablePairs": "BTCCNY,LTCCNY",
"EnabledPairs": "BTCCNY,LTCCNY",
"BaseCurrencies": "CNY",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -285,6 +296,7 @@
"AvailablePairs": "XBTUSD,XBTSGD,XBTEUR",
"EnabledPairs": "XBTUSD,XBTSGD,XBTEUR",
"BaseCurrencies": "USD,SGD,EUR",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -301,9 +313,10 @@
"AuthenticatedAPISupport": false,
"APIKey": "Key",
"APISecret": "Secret",
"AvailablePairs": "XBTUSD,ZECEUR,REPETH,XBTJPY,ETHEUR.D,LTCXBT,GNOXBT,ETHCAD.D,ETHEUR,ETHUSD,ICNXBT,XDGXBT,BCHUSD,DASHEUR,ETHJPY.D,MLNXBT,XBTCAD,GNOETH,ETCUSD,REPXBT,ETCXBT,ICNETH,ETHXBT,XBTJPY.D,XMREUR,XRPUSD,ZECXBT,ETHCAD,XBTGBP.D,MLNETH,BCHEUR,ETCEUR,XBTEUR,XLMXBT,XRPXBT,ETCETH,REPEUR,XMRUSD,ZECUSD,USDTUSD,ETHXBT.D,ETHJPY,ETHUSD.D,XBTUSD.D,LTCUSD,XBTCAD.D,BCHXBT,DASHUSD,EOSXBT,ETHGBP.D,XMRXBT,XRPEUR,DASHXBT,EOSETH,LTCEUR,XBTEUR.D",
"AvailablePairs": "BCHEUR,REPEUR,XBTGBP,XBTUSD,ETHXBT,MLNXBT,ETCEUR,ETHGBP,ICNXBT,ZECEUR,EOSETH,GNOXBT,ETHCAD.D,ETHGBP.D,XRPEUR,BCHXBT,EOSXBT,LTCXBT,XBTEUR.D,XBTUSD.D,DASHUSD,GNOETH,ETHJPY,ETHUSD.D,REPETH,USDTUSD,ETHEUR,XLMXBT,BCHUSD,ETHCAD,XBTEUR,XMRUSD,ZECXBT,LTCUSD,XBTCAD,XMRXBT,ETHJPY.D,ICNETH,XBTCAD.D,XBTJPY,XRPUSD,ZECUSD,DASHEUR,ETCETH,ETCUSD,MLNETH,XMREUR,DASHXBT,ETHXBT.D,XDGXBT,XBTGBP.D,XRPXBT,XBTJPY.D,ETCXBT,ETHEUR.D,ETHUSD,LTCEUR,REPXBT",
"EnabledPairs": "ETCUSD,XBTUSD,ETHUSD",
"BaseCurrencies": "EUR,USD,CAD,GBP,JPY",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -324,6 +337,7 @@
"AvailablePairs": "BTCUSD,BTCEUR,USDHKD,AUDUSD,BTCGBP,BTCNZD,USDJPY,BTCSGD,BTCNGN,EURUSD,USDSGD,NZDUSD,USDNGN,USDCHF,BTCJPY,BTCAUD,BTCCAD,BTCCHF,GBPUSD,USDCAD",
"EnabledPairs": "BTCUSD,BTCAUD",
"BaseCurrencies": "USD,EUR,HKD,AUD,GBP,NZD,JPY,SGD,NGN,CHF,CAD",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -340,9 +354,10 @@
"AuthenticatedAPISupport": false,
"APIKey": "Key",
"APISecret": "Secret",
"AvailablePairs": "SAN_BTC,OAX_BTC,VSL_BTC,PLU_USDT,GUP_ETH,SNT_ETH,EOS_ETH,ICN_USDT,CVC_USDT,DASH_BTC,DASH_USDT,WINGS_USDT,LUN_ETH,CFI_USDT,OAX_USDT,BCAP_ETH,MCO_BTC,STORJ_BTC,ICN_BTC,LTC_ETH,TAAS_BTC,BNT_ETH,QTUM_ETH,REP_ETH,RLC_BTC,HMQ_ETH,TIME_ETH,QRL_USDT,PTOY_USDT,LTC_BTC,GNT_BTC,RLC_USDT,SNT_BTC,RLC_ETH,TRST_USDT,MCO_ETH,ADX_BTC,VSL_USDT,TRST_ETH,DGD_USDT,BCC_ETH,SNM_ETH,DNT_ETH,GNT_ETH,TAAS_USDT,HMQ_USDT,BAT_ETH,STORJ_ETH,ADX_ETH,OMG_USDT,TIME_BTC,PLU_ETH,WINGS_ETH,SNGLS_BTC,CFI_ETH,SAN_ETH,DNT_USDT,STX_ETH,WAVES_BTC,1ST_ETH,INCNT_ETH,MYST_USDT,PTOY_ETH,MLN_USDT,QRL_BTC,ADX_USDT,PAY_ETH,STX_BTC,QTUM_BTC,CVC_ETH,STX_USDT,MLN_BTC,ICN_ETH,BTC_USDT,TRST_BTC,SNM_BTC,NET_BTC,CVC_BTC,OAX_ETH,1ST_BTC,GNT_USDT,GUP_BTC,BAT_USDT,BNT_USDT,STORJ_USDT,PLU_BTC,DASH_ETH,BCAP_USDT,QRL_ETH,PTOY_BTC,PAY_BTC,ZRX_ETH,ZRX_USDT,LTC_USDT,GNO_BTC,TKN_BTC,HMQ_BTC,MCO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ETH,QTUM_USDT,WAVES_USDT,REP_ETH,BNT_BTC,ETH_BTC,WINGS_USDT,SNGLS_ETH,XID_USDT,TNT_BTC,GNT_ETH,WINGS_ETH,BTC_USDT,GUP_USDT,TAAS_ETH,LUN_USDT,HMQ_ETH,MYST_BTC,WAVES_BTC,MLN_ETH,TNT_USDT,STORJ_USDT,OMG_ETH,EDG_BTC,GNO_USDT,BAT_ETH,SNT_USDT,DNT_BTC,PLU_ETH,REP_BTC,ADX_BTC,PAY_ETH,DGD_USDT,ZRX_BTC,WINGS_BTC,QRL_BTC,MCO_BTC,VSL_USDT,BAT_BTC,ANT_USDT,PAY_USDT,XID_ETH,TKN_BTC,EOS_ETH,NET_BTC,RLC_BTC,PTOY_BTC,SNM_ETH,OAX_BTC,1ST_ETH,BCAP_USDT,TRST_USDT,PLU_USDT,GUP_ETH,MCO_USDT,BCC_ETH,ROUND_ETH,TIME_ETH,TIME_BTC,ICN_USDT,GUP_BTC,SNGLS_USDT,PLU_BTC,MYST_USDT,CFI_USDT,SNT_BTC,SNT_ETH,ZRX_USDT,ICN_BTC,BAT_USDT,REP_USDT,HMQ_BTC,OAX_USDT,LTC_BTC,EDG_ETH,GNT_USDT,ROUND_USDT,BNT_USDT,CFI_BTC,CVC_BTC,BCC_USDT,GNT_BTC,STX_ETH,1ST_BTC,MGO_BTC,DNT_USDT,DASH_ETH,1ST_USDT,EDG_USDT,TKN_ETH,PTOY_USDT,ADX_ETH,LTC_USDT,RLC_ETH,HMQ_USDT,ANT_ETH,DGD_ETH,MLN_USDT,TRST_ETH,TAAS_USDT",
"EnabledPairs": "ETH_BTC,LTC_BTC,DASH_BTC",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true,
"Delimiter": "_"
Expand All @@ -365,6 +380,7 @@
"AvailablePairs": "BTCARS,BTCAUD,BTCBRL,BTCCAD,BTCCHF,BTCCZK,BTCDKK,BTCEUR,BTCGBP,BTCHKD,BTCILS,BTCINR,BTCMXN,BTCNOK,BTCNZD,BTCPLN,BTCRUB,BTCSEK,BTCSGD,BTCTHB,BTCUSD,BTCZAR",
"EnabledPairs": "BTCARS,BTCAUD,BTCBRL,BTCCAD,BTCCHF,BTCCZK,BTCDKK,BTCEUR,BTCGBP,BTCHKD,BTCILS,BTCINR,BTCMXN,BTCNOK,BTCNZD,BTCPLN,BTCRUB,BTCSEK,BTCSGD,BTCTHB,BTCUSD,BTCZAR",
"BaseCurrencies": "ARS,AUD,BRL,CAD,CHF,CZK,DKK,EUR,GBP,HKD,ILS,INR,MXN,NOK,NZD,PLN,RUB,SEK,SGD,THB,USD,ZAR",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -384,6 +400,7 @@
"AvailablePairs": "BTCCNY,LTCCNY",
"EnabledPairs": "BTCCNY,LTCCNY",
"BaseCurrencies": "CNY",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -404,6 +421,7 @@
"AvailablePairs": "BTCUSD,LTCUSD",
"EnabledPairs": "BTCUSD,LTCUSD",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT,this_week,next_week,quarter",
"ConfigCurrencyPairFormat": {
"Uppercase": true
},
Expand All @@ -424,6 +442,7 @@
"AvailablePairs": "BTC_XUSD,BTC_FCT,BTC_MMNXT,BTC_NMC,BTC_BITUSD,BTC_RDD,BTC_XMR,BTC_XST,BTC_DSH,BTC_MAID,BTC_DGB,BTC_NEOS,BTC_BLK,BTC_NAUT,BTC_NBT,BTC_XCP,BTC_STR,BTC_BTCD,BTC_GRC,BTC_HUC,BTC_BBR,BTC_XDN,BTC_INDEX,BTC_IOC,BTC_SWARM,BTC_EMC2,BTC_MCN,BTC_NOXT,BTC_MINT,BTC_PTS,BTC_SC,BTC_GEO,BTC_XRP,BTC_FLO,BTC_BITS,BTC_HYP,BTC_XCR,BTC_LTBC,BTC_SYS,BTC_GMC,BTC_ETH,BTC_SYNC,BTC_GAP,BTC_BCN,BTC_C2,BTC_PINK,BTC_FIBRE,BTC_POT,BTC_QTL,BTC_SDC,BTC_XC,BTC_DASH,BTC_SILK,BTC_CLAM,BTC_NAV,BTC_PIGGY,BTC_BCY,BTC_MIL,BTC_XCN,BTC_YACC,BTC_BTS,BTC_QBK,BTC_SJCX,BTC_LQD,BTC_BURST,BTC_RIC,BTC_VRC,BTC_LTC,BTC_XPB,BTC_GRS,BTC_XCH,BTC_ARCH,BTC_QORA,BTC_HZ,BTC_NSR,BTC_XPM,BTC_BITCNY,BTC_EXE,BTC_XMG,BTC_BTC,BTC_BTM,BTC_NOBL,BTC_NXT,BTC_DOGE,BTC_CURE,BTC_MNTA,BTC_ADN,BTC_EXP,BTC_VTC,BTC_FLDC,BTC_MRS,BTC_MYR,BTC_OMNI,BTC_VNL,BTC_USDT,BTC_NOTE,BTC_WDC,BTC_BELA,BTC_VIA,BTC_CGA,BTC_DIEM,BTC_IFC,BTC_XDP,BTC_BLOCK,BTC_MMC,BTC_1CR,BTC_UNITY,BTC_XBC,BTC_GEMZ,BTC_FLT,BTC_PPC,BTC_XEM,BTC_RBY,BTC_CNMT,BTC_ABY,XMR_XDN,XMR_IFC,XMR_DIEM,XMR_BBR,XMR_DSH,XMR_BCN,XMR_LTC,XMR_MAID,XMR_DASH,XMR_BTCD,XMR_HYP,XMR_BLK,XMR_QORA,XMR_MNTA,XMR_NXT,USDT_BTC,USDT_ETH,USDT_XRP,USDT_DASH,USDT_LTC,USDT_NXT,USDT_XMR,USDT_STR",
"EnabledPairs": "BTC_LTC,BTC_ETH,BTC_DOGE,BTC_DASH,BTC_XRP",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT",
"ConfigCurrencyPairFormat": {
"Uppercase": true,
"Delimiter": "_"
Expand Down
28 changes: 14 additions & 14 deletions events/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ import (
)

func TestAddEvent(t *testing.T) {
eventID, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", actionTest)
eventID, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", "SPOT", actionTest)
if err != nil && eventID != 0 {
t.Errorf("Test Failed. AddEvent: Error, %s", err)
}
eventID, err = AddEvent("ANXX", "price", ">,==", "BTC", "LTC", actionTest)
eventID, err = AddEvent("ANXX", "price", ">,==", "BTC", "LTC", "SPOT", actionTest)
if err == nil && eventID == 0 {
t.Error("Test Failed. AddEvent: Error, error not captured in Exchange")
}
eventID, err = AddEvent("ANX", "prices", ">,==", "BTC", "LTC", actionTest)
eventID, err = AddEvent("ANX", "prices", ">,==", "BTC", "LTC", "SPOT", actionTest)
if err == nil && eventID == 0 {
t.Error("Test Failed. AddEvent: Error, error not captured in Item")
}
eventID, err = AddEvent("ANX", "price", "3===D", "BTC", "LTC", actionTest)
eventID, err = AddEvent("ANX", "price", "3===D", "BTC", "LTC", "SPOT", actionTest)
if err == nil && eventID == 0 {
t.Error("Test Failed. AddEvent: Error, error not captured in Condition")
}
eventID, err = AddEvent("ANX", "price", ">,==", "BTC", "LTC", "console_prints")
eventID, err = AddEvent("ANX", "price", ">,==", "BTC", "LTC", "SPOT", "console_prints")
if err == nil && eventID == 0 {
t.Error("Test Failed. AddEvent: Error, error not captured in Action")
}
eventID, err = AddEvent("ANX", "price", ">,==", "BATMAN", "ROBIN", actionTest)
eventID, err = AddEvent("ANX", "price", ">,==", "BATMAN", "ROBIN", "SPOT", actionTest)
if err == nil && eventID == 0 {
t.Error("Test Failed. AddEvent: Error, error not captured in Action")
}
Expand All @@ -35,7 +35,7 @@ func TestAddEvent(t *testing.T) {
}

func TestRemoveEvent(t *testing.T) {
eventID, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", actionTest)
eventID, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", "SPOT", actionTest)
if err != nil && eventID != 0 {
t.Errorf("Test Failed. RemoveEvent: Error, %s", err)
}
Expand All @@ -48,15 +48,15 @@ func TestRemoveEvent(t *testing.T) {
}

func TestGetEventCounter(t *testing.T) {
one, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", actionTest)
one, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", "SPOT", actionTest)
if err != nil {
t.Errorf("Test Failed. GetEventCounter: Error, %s", err)
}
two, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", actionTest)
two, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", "SPOT", actionTest)
if err != nil {
t.Errorf("Test Failed. GetEventCounter: Error, %s", err)
}
three, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", actionTest)
three, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", "SPOT", actionTest)
if err != nil {
t.Errorf("Test Failed. GetEventCounter: Error, %s", err)
}
Expand Down Expand Up @@ -84,7 +84,7 @@ func TestGetEventCounter(t *testing.T) {
}

func TestExecuteAction(t *testing.T) {
one, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", actionTest)
one, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", "SPOT", actionTest)
if err != nil {
t.Errorf("Test Failed. ExecuteAction: Error, %s", err)
}
Expand All @@ -100,13 +100,13 @@ func TestExecuteAction(t *testing.T) {
}

func TestEventToString(t *testing.T) {
one, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", actionTest)
one, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", "SPOT", actionTest)
if err != nil {
t.Errorf("Test Failed. EventToString: Error, %s", err)
}

eventString := Events[one].EventToString()
if eventString != "If the BTCLTC price on ANX is > == then ACTION_TEST." {
if eventString != "If the BTCLTC [SPOT] price on ANX is > == then ACTION_TEST." {
t.Error("Test Failed. EventToString: Error, incorrect return string")
}

Expand All @@ -116,7 +116,7 @@ func TestEventToString(t *testing.T) {
}

func TestCheckCondition(t *testing.T) { //error handling needs to be implemented
one, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", actionTest)
one, err := AddEvent("ANX", "price", ">,==", "BTC", "LTC", "SPOT", actionTest)
if err != nil {
t.Errorf("Test Failed. EventToString: Error, %s", err)
}
Expand Down
Loading

0 comments on commit 913c104

Please sign in to comment.