public void Signature_throws_when_buffer_smaller_than_4() { var exception = Throws <ArgumentException>(() => new Sha256Signer(new byte[3])); That(exception.Message, DoesContain.Substring("The buffer must have at least 4 bytes.")); }
public void Signature_throws_at_the_beginning() { var exception = Throws <Exception>(() => { var _ = new Sha256Signer().Signature; }); That(exception.Message, DoesContain.Substring("The hash has not yet been calculated. Call 'Finish' to calculate the hash.")); }