Skip to content

Commit

Permalink
Rename test project
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilphillip committed Jun 4, 2024
1 parent 7133ca4 commit 3347e78
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Stripe.Extensions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stripe.Extensions.AspNetCor
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A01CFCC5-52FD-4C50-AF65-C9C66D10BC8A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stripe.AspNetCore.Tests", "tests\Stripe.AspNetCore.Tests\Stripe.AspNetCore.Tests.csproj", "{43A5C314-149B-4434-9D3C-5A0650CE4E9C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stripe.Extensions.AspNetCore.Tests", "tests\Stripe.Extensions.AspNetCore.Tests\Stripe.Extensions.AspNetCore.Tests.csproj", "{43A5C314-149B-4434-9D3C-5A0650CE4E9C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stripe.Extensions.DependencyInjection.Tests", "tests\Stripe.Extensions.DependencyInjection.Tests\Stripe.Extensions.DependencyInjection.Tests.csproj", "{66DDC5B6-42B8-4DE6-BE7B-6A021C135184}"
EndProject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
Expand Down Expand Up @@ -36,12 +35,6 @@ public static IEndpointRouteBuilder MapStripeWebhookHandler<T>(this IEndpointRou
var options = context.RequestServices.GetRequiredService<IOptionsSnapshot<StripeOptions>>()
.Get(namedConfiguration);

if (options == null)
{
throw new InvalidOperationException(
$"Stripe services for {namedConfiguration} were not registered. Please call services.AddStripe()");
}

var stripeWebhookContext = new StripeWebhookContext(context, options, stripeClient);
var handler = (T)handlerFactory(context.RequestServices, [stripeWebhookContext]);
await handler.ExecuteAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Stripe.Extensions.AspNetCore;
using Stripe.Extensions.DependencyInjection;
using Xunit;

namespace Stripe.AspNetCore.Tests;
namespace Stripe.Extensions.AspNetCore.Tests;

public class WebhookHandlerTests
{
Expand Down

0 comments on commit 3347e78

Please sign in to comment.