Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 811 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 811 Bytes

DEPRECATED: PROJECT HAVE BEEN MOVED TO https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.TestFramework


NBitcoin.TestFramework

A test framework for easily create bitcoind instances in integration tests.

Example:

using(var builder = NodeBuilder.Create())
{
	var node1 = builder.CreateNode();
	var node2 = builder.CreateNode();
	builder.StartAll();
	node2.Generate(50);
	node2.Sync(node1);

	var bestblock1 = node1.CreateRPCClient().GetBestBlockHash();
	var bestblock2 = node2.CreateRPCClient().GetBestBlockHash();
	Assert.Equal(bestblock1, bestblock2);
}

Available on Nuget.

Install-Package NBitcoin.TestFramework

First run might take times as Bitcoin Core is downloaded automatically.