mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Code cleanup
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using Velopack;
|
||||
using System.Xml;
|
||||
using Velopack.NuGet;
|
||||
using Velopack.Tests.TestHelpers;
|
||||
using Xunit;
|
||||
|
||||
namespace Velopack.Tests
|
||||
{
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using NuGet;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Velopack.Tests.OldSquirrel
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Velopack.Tests.OldSquirrel
|
||||
{
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Velopack.Tests.OldSquirrel
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Velopack.Tests.OldSquirrel
|
||||
namespace Velopack.Tests.OldSquirrel
|
||||
{
|
||||
internal static class Utility
|
||||
{
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text;
|
||||
using NuGet.Versioning;
|
||||
using Velopack.Tests.TestHelpers;
|
||||
using Xunit;
|
||||
using OldReleaseEntry = Velopack.Tests.OldSquirrel.ReleaseEntry;
|
||||
using OldSemanticVersion = Velopack.Tests.OldSquirrel.SemanticVersion;
|
||||
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Velopack.Windows;
|
||||
using Velopack.Windows;
|
||||
|
||||
namespace Velopack.Tests
|
||||
{
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using Xunit;
|
||||
|
||||
namespace Velopack.Tests.TestHelpers
|
||||
{
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
|
||||
namespace Velopack.Tests
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
using Velopack.Sources;
|
||||
|
||||
namespace Velopack.Tests.TestHelpers
|
||||
@@ -47,7 +43,7 @@ namespace Velopack.Tests.TestHelpers
|
||||
var rel = _releases.FirstOrDefault(r => url.EndsWith(r.OriginalFilename));
|
||||
if (rel == null)
|
||||
throw new Exception("Fake release not found: " + url);
|
||||
|
||||
|
||||
var filePath = PathHelper.GetFixture(rel.OriginalFilename);
|
||||
if (!File.Exists(filePath)) {
|
||||
throw new NotSupportedException("FakeFixtureRepository doesn't have: " + rel.OriginalFilename);
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Velopack.Tests
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
using NuGet.Versioning;
|
||||
using Velopack.Locators;
|
||||
using Velopack.Sources;
|
||||
@@ -28,7 +22,7 @@ namespace Velopack.Tests
|
||||
using var _1 = Utility.GetTempDirectory(out var tempPath);
|
||||
|
||||
string releasesSuffix = VelopackRuntimeInfo.IsOSX ? "-osx" : "";
|
||||
|
||||
|
||||
File.WriteAllText(Path.Combine(tempPath, "RELEASES" + releasesSuffix), """
|
||||
3a2eadd15dd984e4559f2b4d790ec8badaeb6a39 MyCoolApp-1.1.0.nupkg 1040561
|
||||
94689fede03fed7ab59c24337673a27837f0c3ec MyCoolApp-1.0.0.nupkg 1004502
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Velopack;
|
||||
using Velopack.Tests.TestHelpers;
|
||||
using Xunit;
|
||||
using Velopack.Windows;
|
||||
using System.Collections.Generic;
|
||||
using Xunit.Abstractions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace Velopack.Tests
|
||||
{
|
||||
@@ -30,7 +21,7 @@ namespace Velopack.Tests
|
||||
[InlineData("/file", "\\file")]
|
||||
[InlineData("/file/", "\\file")]
|
||||
[InlineData("one\\two\\..\\file", "one\\file")]
|
||||
[InlineData("C:/AnApp/file/", "C:\\AnApp\\file")]
|
||||
[InlineData("C:/AnApp/file/", "C:\\AnApp\\file")]
|
||||
public void PathIsNormalized(string input, string expected)
|
||||
{
|
||||
Skip.IfNot(VelopackRuntimeInfo.IsWindows);
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Packaging;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO.Packaging;
|
||||
using NuGet.Versioning;
|
||||
using Velopack.NuGet;
|
||||
using Velopack.Tests.TestHelpers;
|
||||
using Xunit;
|
||||
using ZipPackage = Velopack.NuGet.ZipPackage;
|
||||
|
||||
namespace Velopack.Tests
|
||||
|
||||
Reference in New Issue
Block a user