mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 01:18:15 +08:00
Added a get authentication test, removed the infrastructure name space as it seemed pointless, started thinking about how to pass claims on with the request
This commit is contained in:
@ -6,19 +6,18 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using Ocelot.Library.Infrastructure.Authentication;
|
||||
using Ocelot.Library.Infrastructure.Builder;
|
||||
using Ocelot.Library.Infrastructure.DownstreamRouteFinder;
|
||||
using Ocelot.Library.Infrastructure.Middleware;
|
||||
using Ocelot.Library.Infrastructure.Repository;
|
||||
using Ocelot.Library.Infrastructure.Responses;
|
||||
using Ocelot.Library.Infrastructure.UrlMatcher;
|
||||
using TestStack.BDDfy;
|
||||
using Xunit;
|
||||
|
||||
namespace Ocelot.UnitTests.Middleware
|
||||
{
|
||||
using Library.Infrastructure.Configuration;
|
||||
using Library.Authentication;
|
||||
using Library.Builder;
|
||||
using Library.DownstreamRouteFinder;
|
||||
using Library.Middleware;
|
||||
using Library.Repository;
|
||||
using Library.Responses;
|
||||
using Library.UrlMatcher;
|
||||
|
||||
public class AuthenticationMiddlewareTests : IDisposable
|
||||
{
|
||||
|
@ -6,17 +6,18 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using Ocelot.Library.Infrastructure.Builder;
|
||||
using Ocelot.Library.Infrastructure.DownstreamRouteFinder;
|
||||
using Ocelot.Library.Infrastructure.Middleware;
|
||||
using Ocelot.Library.Infrastructure.Repository;
|
||||
using Ocelot.Library.Infrastructure.Responses;
|
||||
using Ocelot.Library.Infrastructure.UrlMatcher;
|
||||
using TestStack.BDDfy;
|
||||
using Xunit;
|
||||
|
||||
namespace Ocelot.UnitTests.Middleware
|
||||
{
|
||||
using Library.Builder;
|
||||
using Library.DownstreamRouteFinder;
|
||||
using Library.Middleware;
|
||||
using Library.Repository;
|
||||
using Library.Responses;
|
||||
using Library.UrlMatcher;
|
||||
|
||||
public class DownstreamRouteFinderMiddlewareTests : IDisposable
|
||||
{
|
||||
private readonly Mock<IDownstreamRouteFinder> _downstreamRouteFinder;
|
||||
|
@ -1,18 +1,16 @@
|
||||
using Ocelot.Library.Infrastructure.Builder;
|
||||
using Ocelot.Library.Infrastructure.Middleware;
|
||||
|
||||
namespace Ocelot.UnitTests.Middleware
|
||||
namespace Ocelot.UnitTests.Middleware
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using Library.Infrastructure.Configuration;
|
||||
using Library.Infrastructure.DownstreamRouteFinder;
|
||||
using Library.Infrastructure.Repository;
|
||||
using Library.Infrastructure.Responses;
|
||||
using Library.Infrastructure.UrlMatcher;
|
||||
using Library.Infrastructure.UrlTemplateReplacer;
|
||||
using Library.Builder;
|
||||
using Library.DownstreamRouteFinder;
|
||||
using Library.Middleware;
|
||||
using Library.Repository;
|
||||
using Library.Responses;
|
||||
using Library.UrlMatcher;
|
||||
using Library.UrlTemplateReplacer;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
@ -7,15 +7,16 @@ using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using Ocelot.Library.Infrastructure.Middleware;
|
||||
using Ocelot.Library.Infrastructure.Repository;
|
||||
using Ocelot.Library.Infrastructure.RequestBuilder;
|
||||
using Ocelot.Library.Infrastructure.Responses;
|
||||
using TestStack.BDDfy;
|
||||
using Xunit;
|
||||
|
||||
namespace Ocelot.UnitTests.Middleware
|
||||
{
|
||||
using Library.Middleware;
|
||||
using Library.Repository;
|
||||
using Library.RequestBuilder;
|
||||
using Library.Responses;
|
||||
|
||||
public class HttpRequestBuilderMiddlewareTests : IDisposable
|
||||
{
|
||||
private readonly Mock<IRequestBuilder> _requestBuilder;
|
||||
|
@ -6,16 +6,17 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using Ocelot.Library.Infrastructure.Middleware;
|
||||
using Ocelot.Library.Infrastructure.Repository;
|
||||
using Ocelot.Library.Infrastructure.RequestBuilder;
|
||||
using Ocelot.Library.Infrastructure.Requester;
|
||||
using Ocelot.Library.Infrastructure.Responses;
|
||||
using TestStack.BDDfy;
|
||||
using Xunit;
|
||||
|
||||
namespace Ocelot.UnitTests.Middleware
|
||||
{
|
||||
using Library.Middleware;
|
||||
using Library.Repository;
|
||||
using Library.RequestBuilder;
|
||||
using Library.Requester;
|
||||
using Library.Responses;
|
||||
|
||||
public class HttpRequesterMiddlewareTests : IDisposable
|
||||
{
|
||||
private readonly Mock<IHttpRequester> _requester;
|
||||
|
@ -6,15 +6,16 @@ using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using Ocelot.Library.Infrastructure.Middleware;
|
||||
using Ocelot.Library.Infrastructure.Repository;
|
||||
using Ocelot.Library.Infrastructure.Responder;
|
||||
using Ocelot.Library.Infrastructure.Responses;
|
||||
using TestStack.BDDfy;
|
||||
using Xunit;
|
||||
|
||||
namespace Ocelot.UnitTests.Middleware
|
||||
{
|
||||
using Library.Middleware;
|
||||
using Library.Repository;
|
||||
using Library.Responder;
|
||||
using Library.Responses;
|
||||
|
||||
public class HttpResponderMiddlewareTests : IDisposable
|
||||
{
|
||||
private readonly Mock<IHttpResponder> _responder;
|
||||
|
Reference in New Issue
Block a user