public void ShouldReturnTrueIfChainIsValid() { BasicChain bc = new BasicChain(); Assert.That(bc.Blockchain.Count, Is.Not.Zero); bc.AddSampleBlocks(); bool isChainValid = bc.IsBlockchainValid(); Assert.IsTrue(isChainValid); }
public void ShouldReturnFalseIfChainIsInvalid() { BasicChain bc = new BasicChain(); Assert.That(bc.Blockchain.Count, Is.Not.Zero); bc.AddSampleBlocks(); bc.Blockchain.Add(new Block("blah blah", "Setting up to fail")); bool isChainValid = bc.IsBlockchainValid(); Assert.IsFalse(isChainValid); }