Skip to content

Commit 5e7c57d

Browse files
Update test project to work with .NET Standard 1.0
1 parent af60b61 commit 5e7c57d

File tree

6 files changed

+33
-77
lines changed

6 files changed

+33
-77
lines changed

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"name": "lz-string-csharp",
33
"version": "1.4.0",
44
"description": "lz-string c# implementation",

src/LZStringCSharp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<AssemblyVersion>1.3.0.0</AssemblyVersion>
1212
<FileVersion>1.3.0.0</FileVersion>
1313
<Company />
14+
<Copyright>Copyright jawa-the-hutt © 2017</Copyright>
1415
<Product>LZStringCSharp</Product>
1516
<Authors>jawa-the-hutt, christianrondeau</Authors>
1617
<Version>1.3.0</Version>

tests/LZStringCSharp.Tests.csproj

Lines changed: 15 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,24 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{B8504599-355D-46BA-A20B-A4C99369CF6A}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>LZStringCSharp.Tests</RootNamespace>
11-
<AssemblyName>LZStringCSharp.Tests</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<IsTestProject>true</IsTestProject>
4+
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
5+
<Description>LZ String C# Compression Library (Tests)</Description>
156
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<DebugType>pdbonly</DebugType>
27-
<Optimize>true</Optimize>
28-
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
30-
<ErrorReport>prompt</ErrorReport>
31-
<WarningLevel>4</WarningLevel>
32-
</PropertyGroup>
33-
<ItemGroup>
34-
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
35-
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
36-
<Private>True</Private>
37-
</Reference>
38-
<Reference Include="System" />
39-
<Reference Include="System.Core" />
40-
<Reference Include="System.Xml.Linq" />
41-
<Reference Include="System.Data.DataSetExtensions" />
42-
<Reference Include="Microsoft.CSharp" />
43-
<Reference Include="System.Data" />
44-
<Reference Include="System.Net.Http" />
45-
<Reference Include="System.Xml" />
46-
</ItemGroup>
7+
478
<ItemGroup>
48-
<Compile Include="LZStringTests.cs" />
49-
<Compile Include="Properties\AssemblyInfo.cs" />
50-
</ItemGroup>
51-
<ItemGroup>
52-
<None Include="packages.config" />
9+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
5310
</ItemGroup>
11+
5412
<ItemGroup>
55-
<ProjectReference Include="..\src\LZStringCSharp.csproj">
56-
<Project>{4E440D71-82BE-4217-A1DC-98BF45945EB0}</Project>
57-
<Name>LZStringCSharp</Name>
58-
</ProjectReference>
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
14+
<PackageReference Include="NUnit" Version="3.12.0" />
15+
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">
16+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
17+
<PrivateAssets>all</PrivateAssets>
18+
</PackageReference>
5919
</ItemGroup>
20+
6021
<ItemGroup>
61-
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
22+
<ProjectReference Include="..\src\LZStringCSharp.csproj" />
6223
</ItemGroup>
63-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6424
</Project>

tests/LZStringTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ private static string RunNodeLzString(string fn, string value)
243243
var output = new StringBuilder();
244244
var error = new StringBuilder();
245245
// ReSharper disable once AssignNullToNotNullAttribute
246-
var workingDirectory = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(TestContext.CurrentContext.TestDirectory), "../../"));
246+
var workingDirectory = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(TestContext.CurrentContext.TestDirectory), "../../../"));
247247
if (!Directory.Exists(Path.Combine(workingDirectory, "node_modules", "lz-string")))
248-
Assert.Inconclusive( $"lz-string is not installed. Use `npm install` in `{workingDirectory}` and re-run tests.");
248+
throw new AssertionException( $"lz-string is not installed. Use `npm install` in `{workingDirectory}` and re-run tests.");
249249
using (var process = new Process
250250
{
251251
StartInfo =

tests/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)