Permalink
Browse files

Update tests for 4.0

  • Loading branch information...
nwoolls committed Feb 8, 2015
1 parent bdc0ec4 commit 74e2c38c7c8fa02f5ac00f5b3e02ef6bb8c2ab26
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CCCFEA18-6259-481B-8A5A-FC97592AD8B0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MultiMiner.TUI.Tests</RootNamespace>
<AssemblyName>MultiMiner.TUI.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5.3</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.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>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MultiMiner.TUI.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MultiMiner.TUI.Tests")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("cccfea18-6259-481b-8a5a-fc97592ad8b0")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -87,6 +87,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiMiner.UX.Tests", "Mult
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiMiner.WhatToMine", "MultiMiner.WhatToMine\MultiMiner.WhatToMine.csproj", "{6B967BB0-692A-4AD5-99EE-93C054F05792}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiMiner.MobileMiner.Embed", "MultiMiner.MobileMiner.Embed\MultiMiner.MobileMiner.Embed.csproj", "{94F1A985-4DB1-46F0-A522-30B3A968E7DA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiMiner.TUI", "MultiMiner.TUI\MultiMiner.TUI.csproj", "{759B14BD-DAB2-4126-BD79-374036196605}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiMiner.TUI.Tests", "MultiMiner.TUI.Tests\MultiMiner.TUI.Tests.csproj", "{CCCFEA18-6259-481B-8A5A-FC97592AD8B0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -257,6 +263,18 @@ Global
{6B967BB0-692A-4AD5-99EE-93C054F05792}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B967BB0-692A-4AD5-99EE-93C054F05792}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B967BB0-692A-4AD5-99EE-93C054F05792}.Release|Any CPU.Build.0 = Release|Any CPU
{94F1A985-4DB1-46F0-A522-30B3A968E7DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94F1A985-4DB1-46F0-A522-30B3A968E7DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94F1A985-4DB1-46F0-A522-30B3A968E7DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94F1A985-4DB1-46F0-A522-30B3A968E7DA}.Release|Any CPU.Build.0 = Release|Any CPU
{759B14BD-DAB2-4126-BD79-374036196605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{759B14BD-DAB2-4126-BD79-374036196605}.Debug|Any CPU.Build.0 = Debug|Any CPU
{759B14BD-DAB2-4126-BD79-374036196605}.Release|Any CPU.ActiveCfg = Release|Any CPU
{759B14BD-DAB2-4126-BD79-374036196605}.Release|Any CPU.Build.0 = Release|Any CPU
{CCCFEA18-6259-481B-8A5A-FC97592AD8B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CCCFEA18-6259-481B-8A5A-FC97592AD8B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCCFEA18-6259-481B-8A5A-FC97592AD8B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CCCFEA18-6259-481B-8A5A-FC97592AD8B0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1,6 +1,6 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MultiMiner.Win.Extensions;
using MultiMiner.UX.Extensions;
using System.Globalization;
using System.Threading;

@@ -50,6 +50,7 @@
</Otherwise>
</Choose>
<ItemGroup>
<Compile Include="DateTimeExtensionsTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
@@ -15,7 +15,7 @@ public void Find_Succeeds()

for (int i = 0; i < times; i++)
{
List<IPEndPoint> endpoints = PortScanner.Find(IPAddress.Parse("192.168.0.254"), IPAddress.Parse("192.168.0.255"), 4028, 4028);
List<IPEndPoint> endpoints = PortScanner.Find(IPAddress.Parse("192.168.0.199"), IPAddress.Parse("192.168.0.200"), 4028, 4028);
Assert.IsTrue(endpoints.Count > 0);
}
}
@@ -50,7 +50,6 @@
</Otherwise>
</Choose>
<ItemGroup>
<Compile Include="DateTimeExtensionsTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
@@ -14,15 +14,15 @@ public void Find_FindsMiners()

for (int i = 0; i < times; i++)
{
List<IPEndPoint> miners = MinerFinder.Find(IPAddress.Parse("192.168.0.254"), IPAddress.Parse("192.168.0.255"), 4028, 4028);
List<IPEndPoint> miners = MinerFinder.Find(IPAddress.Parse("192.168.0.199"), IPAddress.Parse("192.168.0.200"), 4028, 4028);
Assert.IsTrue(miners.Count > 0);
}
}

[TestMethod]
public void Check_ChecksMiners()
{
List<IPEndPoint> miners = MinerFinder.Find(IPAddress.Parse("192.168.0.254"), IPAddress.Parse("192.168.0.255"), 4028, 4028);
List<IPEndPoint> miners = MinerFinder.Find(IPAddress.Parse("192.168.0.199"), IPAddress.Parse("192.168.0.200"), 4028, 4028);
int goodCount = miners.Count;

miners.Add(new IPEndPoint(IPAddress.Parse("10.0.0.1"), 1000));

0 comments on commit 74e2c38

Please sign in to comment.