Commit 6d380a7d authored by An Ionescu's avatar An Ionescu

Even more directory/project restructuring. Separating common test classes from specific ones.

parent dbe36757
......@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2046
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Anvoker.Collections.Maps", "src\Maps\Maps.csproj", "{CA98F1BE-E77B-4B55-9B87-4F4F6F7BF412}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Maps", "src\Maps\Maps.csproj", "{CA98F1BE-E77B-4B55-9B87-4F4F6F7BF412}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Anvoker.Collections.Maps.Tests", "src\Tests\Maps\MapsTests.csproj", "{32303BA1-931C-459C-B90D-CF950F4C786B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Maps", "src\Tests\Maps\Tests.Maps.csproj", "{32303BA1-931C-459C-B90D-CF950F4C786B}"
ProjectSection(ProjectDependencies) = postProject
{CA98F1BE-E77B-4B55-9B87-4F4F6F7BF412} = {CA98F1BE-E77B-4B55-9B87-4F4F6F7BF412}
EndProjectSection
......@@ -15,6 +15,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Anvoker.Collections.sln.vsspell = Anvoker.Collections.sln.vsspell
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Common", "src\Tests\Common\Common\Tests.Common.csproj", "{BEAB10EF-BD0D-4144-9AD0-D3BD1C052246}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -29,6 +31,10 @@ Global
{32303BA1-931C-459C-B90D-CF950F4C786B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32303BA1-931C-459C-B90D-CF950F4C786B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32303BA1-931C-459C-B90D-CF950F4C786B}.Release|Any CPU.Build.0 = Release|Any CPU
{BEAB10EF-BD0D-4144-9AD0-D3BD1C052246}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BEAB10EF-BD0D-4144-9AD0-D3BD1C052246}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BEAB10EF-BD0D-4144-9AD0-D3BD1C052246}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEAB10EF-BD0D-4144-9AD0-D3BD1C052246}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
using System;
using NUnit.Framework.Interfaces;
namespace Anvoker.Collections.Tests
namespace Anvoker.Collections.Tests.Common
{
/// <summary>
/// Has the sole purpose of easily allowing us to create an instance of
......
......@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
namespace Anvoker.Collections.Tests
namespace Anvoker.Collections.Tests.Common
{
// TODO: Break this static class into less nondescript static classes once
// there are enough methods to justify their existence. Having "misc"
......
using System;
using System.Collections.Generic;
namespace Anvoker.Collections.Tests
namespace Anvoker.Collections.Tests.Common
{
/// <summary>
/// Provides key, values and comparers appropriate for testing maps.
......
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Common")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Common")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("beab10ef-bd0d-4144-9ad0-d3bd1c052246")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\..\..\Assets\NuGetPackages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\..\..\..\..\Assets\NuGetPackages\NUnit.3.11.0\build\NUnit.props')" />
<Import Project="..\..\..\..\..\Assets\NuGetPackages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\..\..\..\..\Assets\NuGetPackages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BEAB10EF-BD0D-4144-9AD0-D3BD1C052246}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Common</RootNamespace>
<AssemblyName>Common</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.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>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</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="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\Assets\NuGetPackages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\Assets\NuGetPackages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\Assets\NuGetPackages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="ExposedTestFixtureParams.cs" />
<Compile Include="HelperMethods.cs" />
<Compile Include="MapTestData.cs" />
<Compile Include="NestedIDictionary\NestedIDictionaryBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<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('..\..\..\..\..\Assets\NuGetPackages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\Assets\NuGetPackages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\..\..\..\..\Assets\NuGetPackages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\Assets\NuGetPackages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets'))" />
<Error Condition="!Exists('..\..\..\..\..\Assets\NuGetPackages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\..\Assets\NuGetPackages\NUnit.3.11.0\build\NUnit.props'))" />
</Target>
<Import Project="..\..\..\..\..\Assets\NuGetPackages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\..\..\..\..\Assets\NuGetPackages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets')" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.11.0" targetFramework="net461" />
</packages>
\ No newline at end of file
using System;
using System.Collections.Generic;
using Anvoker.Collections.Tests.Common;
namespace Anvoker.Collections.Tests
namespace Anvoker.Collections.Tests.Maps
{
/// <summary>
/// Provides key and values appropriate for testing maps.
......
......@@ -2,8 +2,11 @@
using System.Collections.Generic;
using NUnit.Framework;
using NUnit.Framework.Internal;
using Anvoker.Collections.Maps;
using Anvoker.Collections.Tests.Common;
using Anvoker.Collections.Tests.Maps.NestedIDictionary;
namespace Anvoker.Collections.Tests.MultiBiMapTests
namespace Anvoker.Collections.Tests.Maps.MultiBiMap
{
using Anvoker.Collections.Maps;
using NestedIDictionary;
......@@ -50,7 +53,7 @@ namespace Anvoker.Collections.Tests.MultiBiMapTests
private static TestFixtureParameters ConstructFixtureParams<TKey, TVal>(
MapTestData<TKey, TVal> data)
{
return NestedIDictionaryBase<TKey, TVal,
return NestedIDictionaryMaps<TKey, TVal,
MultiBiMap<TKey, TVal>, ICollection<TVal>>
.ConstructFixtureParams(
GetCtor(data.KeysInitial, data.ValuesInitial),
......
......@@ -2,7 +2,7 @@
using System.Collections.Generic;
using NUnit.Framework;
namespace Anvoker.Collections.Tests.MultiMapTests
namespace Anvoker.Collections.Tests.Maps.MultiMap
{
using Anvoker.Collections.Maps;
......
......@@ -2,12 +2,12 @@
using System.Collections.Generic;
using NUnit.Framework;
using NUnit.Framework.Internal;
using Anvoker.Collections.Maps;
using Anvoker.Collections.Tests.Common;
using Anvoker.Collections.Tests.Maps.NestedIDictionary;
namespace Anvoker.Collections.Tests.MultiMapTests
namespace Anvoker.Collections.Tests.Maps.MultiMap
{
using Anvoker.Collections.Maps;
using NestedIDictionary;
/// <summary>
/// Provides test data for a
/// <see cref="NestedIDictionaryBase{TKey, TVal, TIDict, TValCol}"/> test
......@@ -50,7 +50,7 @@ namespace Anvoker.Collections.Tests.MultiMapTests
private static TestFixtureParameters ConstructFixtureParams<TKey, TVal>(
MapTestData<TKey, TVal> data)
{
return NestedIDictionaryBase<TKey, TVal,
return NestedIDictionaryMaps<TKey, TVal,
MultiMap<TKey, TVal>, ICollection<TVal>>
.ConstructFixtureParams(
GetCtor(data.KeysInitial, data.ValuesInitial),
......
using System.Collections.Generic;
using NUnit.Framework.Interfaces;
namespace Anvoker.Collections.Tests.NestedIDictionary
namespace Anvoker.Collections.Tests.Maps.NestedIDictionary
{
/// <summary>
/// Contains test fixture sources used to initialize the tests in
/// <see cref="NestedIDictionaryBase{TKey, TVal, TIDict, TValCol}"/>.
/// <see cref="NestedIDictionaryMaps{TKey, TVal, TIDict, TValCol}"/>.
/// </summary>
public static class SourceMap
{
private static readonly ITestFixtureData[][] testFixtureSources =
new ITestFixtureData[][]
{
MultiMapTests.NestedIDictionary_FixtureSource.GetFixtureArgs(),
MultiBiMapTests.NestedIDictionary_FixtureSource.GetFixtureArgs()
MultiMap.NestedIDictionary_FixtureSource.GetFixtureArgs(),
MultiBiMap.NestedIDictionary_FixtureSource.GetFixtureArgs()
};
/// <summary>
......
......@@ -42,9 +42,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="ExposedTestFixtureParams.cs" />
<Compile Include="HelperMethods.cs" />
<Compile Include="MapTestData.cs" />
<Compile Include="MapTestDataSource.cs" />
<Compile Include="MultiBiMap\NestedIDictionary_FixtureSource.cs" />
<Compile Include="MultiMap\Constructors.cs" />
......@@ -57,6 +54,10 @@
<Project>{ca98f1be-e77b-4b55-9b87-4f4f6f7bf412}</Project>
<Name>Maps</Name>
</ProjectReference>
<ProjectReference Include="..\Common\Common\Tests.Common.csproj">
<Project>{beab10ef-bd0d-4144-9ad0-d3bd1c052246}</Project>
<Name>Tests.Common</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment