mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
bbgo: rename test case
This commit is contained in:
parent
d63cc42867
commit
e312ec953c
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
func TestTradeCollector(t *testing.T) {
|
||||
func TestTradeCollector_ShouldNotCountDuplicatedTrade(t *testing.T) {
|
||||
symbol := "BTCUSDT"
|
||||
position := types.NewPosition(symbol, "BTC", "USDT")
|
||||
orderStore := NewOrderStore(symbol)
|
||||
|
@ -25,8 +25,6 @@ func TestTradeCollector(t *testing.T) {
|
|||
Symbol: "BTCUSDT",
|
||||
Side: types.SideTypeBuy,
|
||||
IsBuyer: true,
|
||||
Fee: 0,
|
||||
FeeCurrency: "",
|
||||
})
|
||||
assert.False(t, matched, "should be added to the trade store")
|
||||
assert.Equal(t, 1, len(collector.tradeStore.Trades()), "should have one trade in the trade store")
|
||||
|
@ -60,8 +58,6 @@ func TestTradeCollector(t *testing.T) {
|
|||
Symbol: "BTCUSDT",
|
||||
Side: types.SideTypeBuy,
|
||||
IsBuyer: true,
|
||||
Fee: 0,
|
||||
FeeCurrency: "",
|
||||
})
|
||||
assert.True(t, matched, "the same trade should match")
|
||||
assert.Equal(t, 0, len(collector.tradeStore.Trades()), "the same trade should not be added to the trade store")
|
||||
|
|
Loading…
Reference in New Issue
Block a user