Skip to content

Commit 6e463a2

Browse files
authored
Merge pull request #161 from conorhepi/bugfix/set-redirect-type-regex
Add new options parameter to tests
2 parents a96cd34 + 474bfc0 commit 6e463a2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/Geta.NotFoundHandler/Core/Providers/RegexRedirects/RegexRedirectNotFoundHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under Apache-2.0. See the LICENSE file in the project root for more information
33

44
using System.Text.RegularExpressions;
5-
using Geta.NotFoundHandler.Core.Redirects;
65
using Geta.NotFoundHandler.Data;
76
using Geta.NotFoundHandler.Infrastructure.Configuration;
87
using Microsoft.Extensions.Logging;

tests/Geta.NotFoundHandler.Tests/Providers/RegexNotFoundHandlerTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Text.RegularExpressions;
44
using FakeItEasy;
55
using Geta.NotFoundHandler.Core.Providers.RegexRedirects;
66
using Geta.NotFoundHandler.Data;
7+
using Geta.NotFoundHandler.Infrastructure.Configuration;
78
using Microsoft.Extensions.Logging;
9+
using Microsoft.Extensions.Options;
810
using Xunit;
911

1012
namespace Geta.NotFoundHandler.Tests.Providers;
@@ -18,7 +20,8 @@ public RegexNotFoundHandlerTests()
1820
{
1921
_fakeRegexRedirectLoader = A.Fake<IRegexRedirectLoader>();
2022
var fakeLogger = A.Fake<ILogger<RegexRedirectNotFoundHandler>>();
21-
_sut = new RegexRedirectNotFoundHandler(_fakeRegexRedirectLoader, fakeLogger);
23+
var fakeOptions = A.Fake<IOptions<NotFoundHandlerOptions>>();
24+
_sut = new RegexRedirectNotFoundHandler(_fakeRegexRedirectLoader, fakeLogger, fakeOptions);
2225
}
2326

2427
[Fact]

0 commit comments

Comments
 (0)