-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Goose-Bomb/dev
The sound of a pigeon
- Loading branch information
Showing
169 changed files
with
3,449 additions
and
2,034 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using GBCLV3.Models.Download; | ||
using GBCLV3.Services.Download; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
|
||
namespace GBCLV3.Tests | ||
{ | ||
[TestClass] | ||
class DownloadTest | ||
{ | ||
[TestMethod] | ||
public void TestSingleDownload() | ||
{ | ||
var items = new List<DownloadItem>() { | ||
new DownloadItem | ||
{ | ||
Url = "https://github.com/Goose-Bomb/GBCLV3/releases/download/3.0.7.59/GBCL.exe", | ||
Path = "./downloads/gbcl.exe", | ||
Size = 1569294, | ||
IsCompleted = false, | ||
} | ||
}; | ||
|
||
var downloadService = new DownloadService(items); | ||
downloadService.ProgressChanged += e => | ||
{ | ||
Debug.WriteLine("---------------------------------------------------------------"); | ||
Debug.WriteLine($"Progress: {e.DownloadedBytes} Bytes"); | ||
Debug.WriteLine($"Speed: {e.Speed} Bytes/sec"); | ||
}; | ||
|
||
bool isSccessful = downloadService.StartAsync().Result; | ||
|
||
Assert.IsTrue(isSccessful); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{EC2B8F3E-4270-4D6A-AFFD-1677BB36F256}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>GBCLV3.Tests</RootNamespace> | ||
<AssemblyName>GBCLV3.Tests</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> | ||
<IsCodedUITest>False</IsCodedUITest> | ||
<TestProjectType>UnitTest</TestProjectType> | ||
<NuGetPackageImportStamp> | ||
</NuGetPackageImportStamp> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> | ||
<DebugSymbols>true</DebugSymbols> | ||
<OutputPath>bin\x64\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<DebugType>full</DebugType> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<ErrorReport>prompt</ErrorReport> | ||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> | ||
<OutputPath>bin\x64\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<Optimize>true</Optimize> | ||
<DebugType>pdbonly</DebugType> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<ErrorReport>prompt</ErrorReport> | ||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="PresentationCore" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Net.Http" /> | ||
</ItemGroup> | ||
|
||
|
||
<ItemGroup> | ||
<Compile Include="AssetTest.cs" /> | ||
<Compile Include="LibraryTest.cs" /> | ||
<Compile Include="LaunchTest.cs" /> | ||
<Compile Include="ModTest.cs" /> | ||
<Compile Include="ResourcePackTest.cs" /> | ||
<Compile Include="InstallTest.cs" /> | ||
<Compile Include="UpdateTest.cs" /> | ||
<Compile Include="TestUtils.cs" /> | ||
<Compile Include="VersionTest.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" /> | ||
<PackageReference Include="MSTest.TestAdapter" Version="2.1.0" /> | ||
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" /> | ||
<PackageReference Include="coverlet.collector" Version="1.2.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="MSTest.TestAdapter"> | ||
<Version>2.0.0</Version> | ||
</PackageReference> | ||
<PackageReference Include="MSTest.TestFramework"> | ||
<Version>2.0.0</Version> | ||
</PackageReference> | ||
<ProjectReference Include="..\GBCLV3\GBCLV3.csproj" /> | ||
</ItemGroup> | ||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.