public void ShouldThrowExceptionWhenSignatureIsNull() { SignatureValidator validator = new SignatureValidator(TestConfiguration.Create()); ExceptionAssert.ThrowsArgumentNullException("signature", () => { validator.Validate(new byte[] { 0 }, null); }); }
public void ShouldThrowExceptionWhenContentIsEmpty() { SignatureValidator validator = new SignatureValidator(TestConfiguration.Create()); ExceptionAssert.ThrowsArgumentEmptyException("content", () => { validator.Validate(new byte[] { }, "test"); }); }
public void ShouldThrowExceptionWhenContentIsNull() { SignatureValidator validator = new SignatureValidator(TestConfiguration.Create()); ExceptionAssert.ThrowsArgumentNullException("content", () => { validator.Validate(null, "test"); }); }
public void ShouldThrowExceptionWhenSignatureIsInvalid() { SignatureValidator validator = new SignatureValidator(TestConfiguration.Create()); ExceptionAssert.Throws <LineBotException>("Invalid signature.", () => { validator.Validate(new byte[] { 42 }, "============================================"); }); }
public void ShouldThrowExceptionWhenSignatureIsEmpty() { SignatureValidator validator = new SignatureValidator(TestConfiguration.Create()); ExceptionAssert.ThrowsArgumentEmptyException("signature", () => { validator.Validate(new byte[] { 0 }, string.Empty); }); }
public void ShouldNotThrowExceptionWhenSignatureIsValid() { SignatureValidator validator = new SignatureValidator(TestConfiguration.Create()); validator.Validate(new byte[] { 42 }, "aajPtaEL8oyiitLlTbSzkFCTDQ7Lr0m/89eDhe6tFx4="); }