Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.vs/
lib/
build/
bin/
obj/
Expand Down
6 changes: 1 addition & 5 deletions PSHostsFile/CmdLets/GetHostsFileEntry.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Management.Automation;
using PSHostsFile.Core;
using System.Management.Automation;


namespace PSHostsFile.CmdLets
Expand Down
7 changes: 1 addition & 6 deletions PSHostsFile/CmdLets/RemoveHostsFileEntry.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Management.Automation;
using System.Text;
using PSHostsFile.Core;
using System.Management.Automation;

namespace PSHostsFile.CmdLets
{
Expand Down
2 changes: 0 additions & 2 deletions PSHostsFile/CmdLets/SetHostsFileEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using System.Text;
using PSHostsFile.Core;

namespace PSHostsFile.CmdLets
{
Expand Down
1 change: 0 additions & 1 deletion PSHostsFile/Core/Remove.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;

Expand Down
5 changes: 2 additions & 3 deletions PSHostsFile/HostsFile.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System;
using PSHostsFile.Core;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using PSHostsFile.Core;

namespace PSHostsFile
{
Expand Down
6 changes: 4 additions & 2 deletions PSHostsFile/PSHostsFile.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PSHostsFile</RootNamespace>
<AssemblyName>PSHostsFile</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -22,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -30,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
Expand Down
7 changes: 1 addition & 6 deletions PSHostsFileTest/AssertFile.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using PowerAssert;
using System.IO;
using System.Linq;
using System.Text;
using NUnit.Framework;
using PowerAssert;

namespace PSHostsFileTest
{
Expand Down
9 changes: 2 additions & 7 deletions PSHostsFileTest/BetterTests/GetHostsFileEntryTests.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
using System;
using System.Collections.Generic;
using NJasmine;
using PSHostsFile;
using System.Collections.ObjectModel;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Text;
using NJasmine;
using PSHostsFile;
using PSHostsFile.CmdLets;

namespace PSHostsFileTest.BetterTests
{
Expand Down
5 changes: 1 addition & 4 deletions PSHostsFileTest/BetterTests/PowershallRunspaceFactory.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using PSHostsFile.CmdLets;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Text;
using PSHostsFile.CmdLets;

namespace PSHostsFileTest.BetterTests
{
Expand Down
4 changes: 1 addition & 3 deletions PSHostsFileTest/BetterTests/SetHostsFileEntryTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using NJasmine;
using System.Linq;
using System.Management.Automation.Runspaces;
using System.Text;
using NJasmine;

namespace PSHostsFileTest.BetterTests
{
Expand Down
21 changes: 17 additions & 4 deletions PSHostsFileTest/PSHostsFileTest.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
<Import Project="..\packages\NUnit3TestAdapter.3.16.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.16.1\build\net35\NUnit3TestAdapter.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -10,9 +12,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PSHostsFileTest</RootNamespace>
<AssemblyName>PSHostsFileTest</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -22,6 +26,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -30,6 +35,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="KellermanSoftware.Compare-NET-Objects">
Expand All @@ -41,8 +47,8 @@
<Reference Include="NJasmine.NUnit">
<HintPath>..\packages\NJasmine.NUnit.0.2.4.0\lib\NJasmine.NUnit.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.0.12054\lib\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="PowerAssert">
<HintPath>..\packages\PowerAssert.1.0.2\lib\PowerAssert.dll</HintPath>
Expand Down Expand Up @@ -79,6 +85,13 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.16.1\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.16.1\build\net35\NUnit3TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
8 changes: 2 additions & 6 deletions PSHostsFileTest/RemoveTest.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NUnit.Framework;
using PSHostsFile.Core;
using System.Text;
using System.Text.RegularExpressions;
using NUnit.Framework;
using PSHostsFile;
using PSHostsFile.Core;

namespace PSHostsFileTest
{
Expand Down
3 changes: 1 addition & 2 deletions PSHostsFileTest/SampleHostsFile.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using System.Text;

namespace PSHostsFileTest
Expand Down
8 changes: 3 additions & 5 deletions PSHostsFileTest/TransformOperationTest.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System;
using System.Collections.Generic;
using NUnit.Framework;
using PSHostsFile.Core;
using System;
using System.Linq;
using System.Text;
using NUnit.Framework;
using PSHostsFile;
using PSHostsFile.Core;

namespace PSHostsFileTest
{
Expand Down
3 changes: 2 additions & 1 deletion PSHostsFileTest/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<packages>
<package id="NJasmine" version="0.2.4.0" targetFramework="net35" />
<package id="NJasmine.NUnit" version="0.2.4.0" targetFramework="net35" />
<package id="NUnit" version="2.6.0.12054" targetFramework="net35" />
<package id="NUnit" version="3.12.0" targetFramework="net48" />
<package id="NUnit3TestAdapter" version="3.16.1" targetFramework="net48" developmentDependency="true" />
<package id="PowerAssert" version="1.0.2" />
</packages>
Binary file added packages/NJasmine.0.2.4.0/.signature.p7s
Binary file not shown.
Binary file modified packages/NJasmine.0.2.4.0/NJasmine.0.2.4.0.nupkg
Binary file not shown.
Binary file added packages/NJasmine.NUnit.0.2.4.0/.signature.p7s
Binary file not shown.
Binary file modified packages/NJasmine.NUnit.0.2.4.0/NJasmine.NUnit.0.2.4.0.nupkg
Binary file not shown.
Binary file removed packages/NUnit.2.6.0.12054/NUnit.2.6.0.12054.nupkg
Binary file not shown.
Binary file removed packages/NUnit.2.6.0.12054/lib/nunit.framework.dll
Binary file not shown.
Loading