public void SignatureIsValidActualJson() { var payload = SampleData.BranchCreate.Body; var expectedSignature = SampleData.BranchCreate.Signature; var secret = IntegrationTests.FunctionBuilder.AppConfig.GitHubWebhookSecret; Assert.IsTrue(GitHubSignatureValidator.IsSignatureValid(payload, expectedSignature, secret)); }
public void SignatureIsNotValid(string payload, string expectedSignature) { Assert.IsFalse(GitHubSignatureValidator.IsSignatureValid(payload, expectedSignature, Secret)); }