Skip to content

Commit 34d5af4

Browse files
Replace test image links with GitHub raw URLs (#4586)
1 parent 67f1eb7 commit 34d5af4

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

src/UniGetUI.Core.IconEngine.Tests/IconCacheEngineTests.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ namespace UniGetUI.Core.IconEngine.Tests
44
{
55
public static class IconCacheEngineTests
66
{
7+
private const string UniGetUiIconUrl =
8+
"https://raw.githubusercontent.com/Devolutions/UniGetUI/main/src/UniGetUI.Core.IconEngine.Tests/TestData/unigetui.png";
9+
10+
private const string ElevenClockIconUrl =
11+
"https://raw.githubusercontent.com/Devolutions/UniGetUI/main/src/UniGetUI.Core.IconEngine.Tests/TestData/elevenclock.png";
12+
713
[Fact]
814
public static void TestCacheEngineForSha256()
915
{
10-
Uri ICON_1 = new Uri("https://marticliment.com/resources/unigetui.png");
16+
Uri ICON_1 = new Uri(UniGetUiIconUrl);
1117
byte[] HASH_1 =
1218
[
1319
0xB7,
@@ -43,7 +49,7 @@ public static void TestCacheEngineForSha256()
4349
0xAF,
4450
0xFF,
4551
];
46-
Uri ICON_2 = new Uri("https://marticliment.com/resources/elevenclock.png");
52+
Uri ICON_2 = new Uri(ElevenClockIconUrl);
4753
byte[] HASH_2 =
4854
[
4955
0x9E,
@@ -134,7 +140,7 @@ public static void TestCacheEngineForSha256()
134140
[Fact]
135141
public static void TestCacheEngineForPackageVersion()
136142
{
137-
Uri URI = new Uri("https://marticliment.com/resources/unigetui.png");
143+
Uri URI = new Uri(UniGetUiIconUrl);
138144
string VERSION = "v3.01";
139145
string MANAGER_NAME = "TestManager";
140146
string PACKAGE_ID = "Package2";
@@ -189,8 +195,8 @@ public static void TestCacheEngineForPackageVersion()
189195
[Fact]
190196
public static void TestCacheEngineForIconUri()
191197
{
192-
Uri URI_1 = new Uri("https://marticliment.com/resources/unigetui.png");
193-
Uri URI_2 = new Uri("https://marticliment.com/resources/elevenclock.png");
198+
Uri URI_1 = new Uri(UniGetUiIconUrl);
199+
Uri URI_2 = new Uri(ElevenClockIconUrl);
194200
string managerName = "TestManager";
195201
string packageId = "Package12";
196202

@@ -239,9 +245,9 @@ public static void TestCacheEngineForIconUri()
239245
[Fact]
240246
public static void TestCacheEngineForPackageSize()
241247
{
242-
Uri ICON_1 = new Uri("https://marticliment.com/resources/unigetui.png");
248+
Uri ICON_1 = new Uri(UniGetUiIconUrl);
243249
int ICON_1_SIZE = 19788;
244-
Uri ICON_2 = new Uri("https://marticliment.com/resources/elevenclock.png");
250+
Uri ICON_2 = new Uri(ElevenClockIconUrl);
245251
int ICON_2_SIZE = 19747;
246252
string managerName = "TestManager";
247253
string packageId = "Package3";

src/UniGetUI.Core.Tools.Tests/ToolsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public void TestRandomStringGenerator(int length)
270270
"https://invalid.url.com/this/is/an/invalid.php?file=to_test&if=the&code_returns=zero",
271271
0
272272
)]
273-
[InlineData("https://marticliment.com/resources/unigetui.png", 19788)]
273+
[InlineData("https://raw.githubusercontent.com/Devolutions/UniGetUI/main/src/UniGetUI.Core.IconEngine.Tests/TestData/unigetui.png", 19788)]
274274
public async Task TestFileSizeLoader(string uri, long expectedSize)
275275
{
276276
long size = await CoreTools.GetFileSizeAsLongAsync(uri != "" ? new Uri(uri) : null);

0 commit comments

Comments
 (0)