Skip to content

minhngoc270499/evm-mock

Repository files navigation

EVM JSONRPC Mock Server

Installation

go get github.com/minhngoc270499/evm-mock

Usage

Running a mock server

package test

import "github.com/minhngoc270499/evm-mock"

func TestWithMockServer() {
	ms := evmmock.NewServer()
	ms.Start()
	defer ms.Stop()
}

Add stub

package test

import "github.com/minhngoc270499/evm-mock"

func TestWithMockServerAndStub() {
	ms := evmmock.NewServer()
	ms.On(evmmock.NewRequest()).WillReturn(evmmock.NewResponse())
	ms.Start()
	defer ms.Stop()
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages