Skip to content

Commit 5319c40

Browse files
Update tests
1 parent ff1786b commit 5319c40

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

UnitTests/LootTest.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
using RobotsParser;
33
using System.IO;
44
using System.Linq;
5+
using System.Threading.Tasks;
56

67
namespace UnitTests;
78

89
public class LootTest
910
{
10-
private const string UserAgent = "FakeAgent";
11-
12-
private IRobots _robots = new Robots(userAgent: UserAgent);
11+
private IRobots _robots = new Robots((url) => Download(url));
12+
private static async Task<string> Download(string url)
13+
{
14+
return "";
15+
}
1316

1417
[SetUp]
1518
public void Setup()

UnitTests/TakealotTest.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
using RobotsParser;
33
using System.IO;
44
using System.Linq;
5+
using System.Threading.Tasks;
56

67
namespace UnitTests;
78

89
public class TakealotTest
910
{
10-
private const string UserAgent = "FakeAgent";
11+
private IRobots _robots = new Robots((url) => Download(url));
1112

12-
private IRobots _robots = new Robots(userAgent: UserAgent);
13+
private static async Task<string> Download(string url)
14+
{
15+
return "";
16+
}
1317

1418
[SetUp]
1519
public void Setup()

UnitTests/UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66

77
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)