-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
72 additions
and
192 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{CAF92D49-B715-429C-9E34-57B7E6E57376}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>MavenNet.Tests</RootNamespace> | ||
<AssemblyName>MavenNet.Tests</AssemblyName> | ||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
<TargetFramework>netcoreapp2.0</TargetFramework> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug</OutputPath> | ||
<DefineConstants>DEBUG;</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="nunit.framework"> | ||
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Test.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\MavenNet\MavenNet.csproj"> | ||
<Project>{58557892-52DF-4BA2-90F4-3C4473508ADD}</Project> | ||
<Name>MavenNet</Name> | ||
</ProjectReference> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" /> | ||
<PackageReference Include="xunit" Version="2.3.1" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
<ProjectReference Include="..\MavenNet\MavenNet.csproj" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,118 @@ | ||
using NUnit.Framework; | ||
using Xunit; | ||
using System.Linq; | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace MavenNet.Tests | ||
{ | ||
[TestFixture()] | ||
public class Test | ||
{ | ||
const string GPS_LOCAL_REPO = "/Users/redth/Library/Developer/Xamarin/android-sdk-macosx/extras/google/m2repository/"; | ||
const string ANDROID_THINGS_URL_REPO = "https://google.bintray.com/androidthings"; | ||
const string GOOGLE_MAVEN_REPO = "https://dl.google.com/dl/android/maven2/"; | ||
|
||
[Test()] | ||
[Fact] | ||
public async Task Test_Refresh_URL() | ||
{ | ||
var repo = MavenRepository.FromUrl(ANDROID_THINGS_URL_REPO); | ||
await repo.Refresh(); | ||
|
||
Assert.IsTrue(repo.Groups.Any()); | ||
Assert.True(repo.Groups.Any()); | ||
} | ||
|
||
[Test] | ||
[Fact] | ||
public async Task Test_Project_URL() | ||
{ | ||
var repo = MavenRepository.FromUrl(ANDROID_THINGS_URL_REPO); | ||
await repo.Refresh(); | ||
|
||
var project = await repo.GetProjectAsync("com.google.android.things", "androidthings", "0.2-devpreview"); | ||
|
||
Assert.IsTrue(project != null); | ||
Assert.True(project != null); | ||
} | ||
|
||
[Test] | ||
[Fact] | ||
public async Task Test_GroupIds_Project_URL() | ||
{ | ||
var repo = MavenRepository.FromUrl(ANDROID_THINGS_URL_REPO); | ||
await repo.Refresh("com.google.android.things"); | ||
|
||
var project = await repo.GetProjectAsync("com.google.android.things", "androidthings", "0.2-devpreview"); | ||
|
||
Assert.IsTrue(project != null); | ||
Assert.True(project != null); | ||
} | ||
|
||
[Category("LOCAL_ONLY")] | ||
[Test] | ||
public async Task Test_Refresh_FILE() | ||
{ | ||
var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO); | ||
await repo.Refresh(); | ||
//[Trait("Category", "LOCAL_ONLY")] | ||
//[Fact] | ||
//public async Task Test_Refresh_FILE() | ||
//{ | ||
// var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO); | ||
// await repo.Refresh(); | ||
|
||
Assert.IsTrue(repo.Groups.Any()); | ||
} | ||
// Assert.True(repo.Groups.Any()); | ||
//} | ||
|
||
[Category("LOCAL_ONLY")] | ||
[Test] | ||
public async Task Test_Project_FILE() | ||
{ | ||
var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO); | ||
await repo.Refresh(); | ||
//[Trait("Category", "LOCAL_ONLY")] | ||
//[Fact] | ||
//public async Task Test_Project_FILE() | ||
//{ | ||
// var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO); | ||
// await repo.Refresh(); | ||
|
||
var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0"); | ||
// var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0"); | ||
|
||
Assert.IsTrue(project != null); | ||
// Assert.True(project != null); | ||
|
||
Assert.IsTrue(project.Dependencies?.Any()); | ||
} | ||
// Assert.True(project.Dependencies?.Any()); | ||
//} | ||
|
||
[Category("LOCAL_ONLY")] | ||
[Test] | ||
public async Task Test_GroupIds_Project_FILE() | ||
{ | ||
var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO); | ||
await repo.Refresh("com.google.android.gms"); | ||
//[Trait("Category", "LOCAL_ONLY")] | ||
//[Fact] | ||
//public async Task Test_GroupIds_Project_FILE() | ||
//{ | ||
// var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO); | ||
// await repo.Refresh("com.google.android.gms"); | ||
|
||
var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0"); | ||
// var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0"); | ||
|
||
Assert.IsTrue(project != null); | ||
// Assert.True(project != null); | ||
|
||
Assert.IsTrue(project.Dependencies?.Any()); | ||
} | ||
// Assert.True(project.Dependencies?.Any()); | ||
//} | ||
|
||
[Test] | ||
[Fact] | ||
public async Task Test_Refresh_GOOGLE() | ||
{ | ||
var repo = MavenRepository.FromGoogle(); | ||
await repo.Refresh(); | ||
|
||
Assert.IsTrue(repo.Groups.Any()); | ||
Assert.True(repo.Groups.Any()); | ||
} | ||
|
||
[Test] | ||
[Fact] | ||
public async Task Test_Project_GOOGLE() | ||
{ | ||
var repo = MavenRepository.FromGoogle(); | ||
await repo.Refresh(); | ||
|
||
var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0"); | ||
|
||
Assert.IsTrue(project != null); | ||
Assert.True(project != null); | ||
|
||
Assert.IsTrue(project.Dependencies?.Any()); | ||
Assert.True(project.Dependencies?.Any()); | ||
} | ||
|
||
[Test] | ||
[Fact] | ||
public async Task Test_GroupIds_Project_GOOGLE() | ||
{ | ||
var repo = MavenRepository.FromGoogle(); | ||
await repo.Refresh("com.google.android.gms"); | ||
|
||
var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0"); | ||
|
||
Assert.IsTrue(project != null); | ||
Assert.True(project != null); | ||
|
||
Assert.IsTrue(project.Dependencies?.Any()); | ||
Assert.True(project.Dependencies?.Any()); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{58557892-52DF-4BA2-90F4-3C4473508ADD}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>MavenNet</RootNamespace> | ||
<AssemblyName>MavenNet</AssemblyName> | ||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
<TargetFrameworks>netstandard2.0</TargetFrameworks> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug</OutputPath> | ||
<DefineConstants>DEBUG;</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
|
||
<PropertyGroup> | ||
<PackageId>MavenNet</PackageId> | ||
<Title>MavenNet</Title> | ||
<Description>A .NET Client for inspecting and interacting with Maven Repositories</Description> | ||
<Summary>A .NET Client for inspecting and interacting with Maven Repositories</Summary> | ||
<PackageLicenseUrl>https://raw.githubusercontent.com/Redth/MavenNet/master/LICENSE</PackageLicenseUrl> | ||
<PackageLicenseUrl>https://github.com/Redth/MavenNet</PackageLicenseUrl> | ||
<PackageTags>Maven</PackageTags> | ||
<Authors>Redth</Authors> | ||
<Owners>Redth</Owners> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml.Serialization" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="MavenRepositoryCollection.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="MavenMetadataParser.cs" /> | ||
<Compile Include="PomParser.cs" /> | ||
<Compile Include="Models\MetadataModels.cs" /> | ||
<Compile Include="Models\PomMavenXsdModels.cs" /> | ||
<Compile Include="FileBasedMavenRepository.cs" /> | ||
<Compile Include="DirectoryMavenRepository.cs" /> | ||
<Compile Include="UrlMavenRepository.cs" /> | ||
<Compile Include="Models\ProjectExtensions.cs" /> | ||
<Compile Include="GoogleMavenRepository.cs" /> | ||
<Compile Include="MavenRepository.cs" /> | ||
<Compile Include="IMavenRepository.cs" /> | ||
<Compile Include="Models\Artifact.cs" /> | ||
<Compile Include="Models\Group.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="Models\" /> | ||
<Compile Remove="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
</Project> | ||
</Project> |
This file was deleted.
Oops, something went wrong.