This commit is contained in:
Andrey Efimenko 2020-10-01 15:02:43 +03:00
Родитель 296ed1d716
Коммит 04604e4789
3 изменённых файлов: 22 добавлений и 30 удалений

Просмотреть файл

@ -9,15 +9,18 @@ namespace Microsoft.Geolocation.Whois.Parsers.Tests
using System;
using System.Collections.Generic;
using Utils;
using VisualStudio.TestTools.UnitTesting;
using NUnit.Framework;
using TestInitialize = NUnit.Framework.SetUpAttribute;
using TestContext = System.Object;
using TestProperty = NUnit.Framework.PropertyAttribute;
using TestClass = NUnit.Framework.TestFixtureAttribute;
using TestMethod = NUnit.Framework.TestAttribute;
using TestCleanup = NUnit.Framework.TearDownAttribute;
[TestClass]
public class TestParsers
{
#if !NUNIT
[DeploymentItem("arin.sample.txt")]
#endif
[TestMethod]
public void TestArinColumnTypes()
{
@ -31,9 +34,6 @@ namespace Microsoft.Geolocation.Whois.Parsers.Tests
CollectionAssert.AreEquivalent(new List<string>() { "POCHandle", "IsRole", "LastName", "FirstName", "Street", "City", "State/Prov", "Country", "PostalCode", "RegDate", "Updated", "OfficePhone", "Mailbox", "Source" }, columns["POCHandle"], "Columns were not extracted correctly for the POCHandle type");
}
#if !NUNIT
[DeploymentItem("arin.sample.txt")]
#endif
[TestMethod]
public void TestArinRetrieveRecords()
{
@ -78,9 +78,6 @@ namespace Microsoft.Geolocation.Whois.Parsers.Tests
}
}
#if !NUNIT
[DeploymentItem("arin.sample.txt")]
#endif
[TestMethod]
public void TestArinRetrieveRecordOfType()
{
@ -133,9 +130,6 @@ namespace Microsoft.Geolocation.Whois.Parsers.Tests
Assert.AreEqual(1, i, "Only two sections should have been extracted");
}
#if !NUNIT
[DeploymentItem("afrinic.sample.txt")]
#endif
[TestMethod]
public void TestAfrinicSectionTokenizer()
{
@ -183,9 +177,6 @@ namespace Microsoft.Geolocation.Whois.Parsers.Tests
Assert.AreEqual(0, i, "Only one section should have been extracted");
}
#if !NUNIT
[DeploymentItem("rwhois.sample.txt")]
#endif
[TestMethod]
public void TestRWhoisRetrieveRecords()
{
@ -270,9 +261,6 @@ namespace Microsoft.Geolocation.Whois.Parsers.Tests
}
}
#if !NUNIT
[DeploymentItem("rwhois-xfer.sample.txt")]
#endif
[TestMethod]
public void TestRWhoisXFerRetrieveRecords()
{

Просмотреть файл

@ -4,9 +4,16 @@
// </copyright>
// -----------------------------------------------------------------------
namespace Microsoft.Geolocation.Whois.Normalization.Tests
{
using VisualStudio.TestTools.UnitTesting;
using NUnit.Framework;
using TestInitialize = NUnit.Framework.SetUpAttribute;
using TestContext = System.Object;
using TestProperty = NUnit.Framework.PropertyAttribute;
using TestClass = NUnit.Framework.TestFixtureAttribute;
using TestMethod = NUnit.Framework.TestAttribute;
using TestCleanup = NUnit.Framework.TearDownAttribute;
[TestClass]
public class NormalizationUtilsTests

Просмотреть файл

@ -62,6 +62,9 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<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="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@ -71,12 +74,6 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Net40|AnyCPU' ">
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
@ -93,15 +90,15 @@
<Compile Include="NormalizationUtilsTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WhoisNormalization\WhoisNormalization.csproj">
<Project>{5b842e6f-0730-4bda-9ded-a8285f62db14}</Project>
<Name>WhoisNormalization</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>