dbm "github.com/vapor/database/leveldb"
"github.com/vapor/protocol/bc"
"github.com/vapor/protocol/bc/types"
+ "github.com/vapor/test/mock"
"github.com/vapor/testutil"
)
func TestGetAccountUtxos(t *testing.T) {
testDB := dbm.NewDB("testdb", "leveldb", "temp")
- testStore := database.NewWalletStore(testDB)
+ testStore := mock.NewMockWalletStore(testDB)
defer func() {
testDB.Close()
os.RemoveAll("temp")
testDB.Set([]byte(k), data)
}
- acccountStore := database.NewAccountStore(testDB)
+ acccountStore := mock.NewMockAccountStore(testDB)
w.AccountMgr = account.NewManager(acccountStore, nil)
w.AccountMgr.AddUnconfirmedUtxo(c.unconfirmedUtxos)
gotUtxos := w.GetAccountUtxos("", c.id, c.unconfirmed, c.isSmartContract, false)
func TestFilterAccountUtxo(t *testing.T) {
testDB := dbm.NewDB("testdb", "leveldb", "temp")
- testStore := database.NewWalletStore(testDB)
+ testStore := mock.NewMockWalletStore(testDB)
defer func() {
testDB.Close()
os.RemoveAll("temp")