public void HashWithBadTypeThrows() { HashAlgorithmProvider hashProvider = new HashAlgorithmProvider(typeof(Exception), false); hashProvider.CreateHash(plainText); }
public void HashFailureThrowsWithInstrumentationEnabled() { HashAlgorithmProvider hashProvider = new HashAlgorithmProvider(typeof(SHA1Managed), false); ReflectionInstrumentationBinder binder = new ReflectionInstrumentationBinder(); binder.Bind(hashProvider.GetInstrumentationEventProvider(), new HashAlgorithmInstrumentationListener("foo", true, true, true)); hashProvider.CreateHash(null); }