Commit a14bb6f1 authored by An Ionescu's avatar An Ionescu

Renaming ctor helper methods in the testing suite to reflect the concrete...

Renaming ctor helper methods in the testing suite to reflect the concrete implmentations they construct.
parent d36f0806
......@@ -6,7 +6,7 @@ namespace Anvoker.Maps.Tests.BiMap
{
public static string Name { get; } = typeof(CompositeBiMap<,>).Name;
public static CompositeBiMap<TKey, TVal> Ctor<TKey, TVal>(MapData<TKey, TVal> d)
public static CompositeBiMap<TKey, TVal> CompositeCtor<TKey, TVal>(MapData<TKey, TVal> d)
{
var m = new CompositeBiMap<TKey, TVal>(d.ComparerKey, d.ComparerValue);
for (int i = 0; i < d.KeysInitial.Length; i++)
......
......@@ -15,16 +15,16 @@ namespace Anvoker.Maps.Tests.BiMap
{ get; } = new ITestFixtureData[]
{
MapFixtureParamConstructor<int, decimal, IBiMap<int, decimal>>
.Construct(Ctor, IntDecimal, Name, fixtureName),
.Construct(CompositeCtor, IntDecimal, Name, fixtureName),
MapFixtureParamConstructor<string, string, IBiMap<string, string>>
.Construct(Ctor, StringStringInsensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringInsensitive, Name, fixtureName),
MapFixtureParamConstructor<string, string, IBiMap<string, string>>
.Construct(Ctor, StringStringSensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringSensitive, Name, fixtureName),
MapFixtureParamConstructor<int[], Type, IBiMap<int[], Type>>
.Construct(Ctor, ArrayIntType, Name, fixtureName),
.Construct(CompositeCtor, ArrayIntType, Name, fixtureName),
};
}
}
\ No newline at end of file
......@@ -15,16 +15,16 @@ namespace Anvoker.Maps.Tests.BiMap
{ get; } = new ITestFixtureData[]
{
MapFixtureParamConstructor<int, decimal, CompositeBiMap<int, decimal>>
.Construct(Ctor, IntDecimal, Name, fixtureName),
.Construct(CompositeCtor, IntDecimal, Name, fixtureName),
MapFixtureParamConstructor<string, string, CompositeBiMap<string, string>>
.Construct(Ctor, StringStringInsensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringInsensitive, Name, fixtureName),
MapFixtureParamConstructor<string, string, CompositeBiMap<string, string>>
.Construct(Ctor, StringStringSensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringSensitive, Name, fixtureName),
MapFixtureParamConstructor<int[], Type, CompositeBiMap<int[], Type>>
.Construct(Ctor, ArrayIntType, Name, fixtureName),
.Construct(CompositeCtor, ArrayIntType, Name, fixtureName),
};
}
}
\ No newline at end of file
......@@ -16,16 +16,16 @@ namespace Anvoker.Maps.Tests.BiMap
{ get; } = new ITestFixtureData[]
{
MapFixtureParamConstructor<int, decimal, IDictionary<int, decimal>>
.Construct(Ctor, IntDecimal, Name, fixtureName),
.Construct(CompositeCtor, IntDecimal, Name, fixtureName),
MapFixtureParamConstructor<string, string, IDictionary<string, string>>
.Construct(Ctor, StringStringInsensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringInsensitive, Name, fixtureName),
MapFixtureParamConstructor<string, string, IDictionary<string, string>>
.Construct(Ctor, StringStringSensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringSensitive, Name, fixtureName),
MapFixtureParamConstructor<int[], Type, IDictionary<int[], Type>>
.Construct(Ctor, ArrayIntType, Name, fixtureName),
.Construct(CompositeCtor, ArrayIntType, Name, fixtureName),
};
}
}
\ No newline at end of file
......@@ -16,19 +16,19 @@ namespace Anvoker.Maps.Tests.BiMap
{
MapFixtureParamConstructor<int, decimal,
IReadOnlyBiMap<int, decimal>>
.Construct(Ctor, IntDecimal, Name, fixtureName),
.Construct(CompositeCtor, IntDecimal, Name, fixtureName),
MapFixtureParamConstructor<string, string,
IReadOnlyBiMap<string, string>>
.Construct(Ctor, StringStringInsensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringInsensitive, Name, fixtureName),
MapFixtureParamConstructor<string, string,
IReadOnlyBiMap<string, string>>
.Construct(Ctor, StringStringSensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringSensitive, Name, fixtureName),
MapFixtureParamConstructor<int[], Type,
IReadOnlyBiMap<int[], Type>>
.Construct(Ctor, ArrayIntType, Name, fixtureName),
.Construct(CompositeCtor, ArrayIntType, Name, fixtureName),
};
}
}
\ No newline at end of file
......@@ -15,16 +15,16 @@ namespace Anvoker.Maps.Tests.BiMap
{ get; } = new ITestFixtureData[]
{
MapFixtureParamConstructor<int, decimal, IFixedKeysBiMap<int, decimal>>
.Construct(Ctor, IntDecimal, Name, fixtureName),
.Construct(CompositeCtor, IntDecimal, Name, fixtureName),
MapFixtureParamConstructor<string, string, IFixedKeysBiMap<string, string>>
.Construct(Ctor, StringStringInsensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringInsensitive, Name, fixtureName),
MapFixtureParamConstructor<string, string, IFixedKeysBiMap<string, string>>
.Construct(Ctor, StringStringSensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringSensitive, Name, fixtureName),
MapFixtureParamConstructor<int[], Type, IFixedKeysBiMap<int[], Type>>
.Construct(Ctor, ArrayIntType, Name, fixtureName),
.Construct(CompositeCtor, ArrayIntType, Name, fixtureName),
};
}
}
\ No newline at end of file
......@@ -15,16 +15,16 @@ namespace Anvoker.Maps.Tests.BiMap
{ get; } = new ITestFixtureData[]
{
MapFixtureParamConstructor<int, decimal, IReadOnlyBiMap<int, decimal>>
.Construct(Ctor, IntDecimal, Name, fixtureName),
.Construct(CompositeCtor, IntDecimal, Name, fixtureName),
MapFixtureParamConstructor<string, string, IReadOnlyBiMap<string, string>>
.Construct(Ctor, StringStringInsensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringInsensitive, Name, fixtureName),
MapFixtureParamConstructor<string, string, IReadOnlyBiMap<string, string>>
.Construct(Ctor, StringStringSensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringSensitive, Name, fixtureName),
MapFixtureParamConstructor<int[], Type, IReadOnlyBiMap<int[], Type>>
.Construct(Ctor, ArrayIntType, Name, fixtureName),
.Construct(CompositeCtor, ArrayIntType, Name, fixtureName),
};
}
}
\ No newline at end of file
......@@ -15,16 +15,16 @@ namespace Anvoker.Maps.Tests.BiMap
{ get; } = new ITestFixtureData[]
{
MapFixtureParamConstructor<int, decimal, IReadOnlyBiMap<int, decimal>>
.Construct(Ctor, IntDecimal, Name, fixtureName),
.Construct(CompositeCtor, IntDecimal, Name, fixtureName),
MapFixtureParamConstructor<string, string, IReadOnlyBiMap<string, string>>
.Construct(Ctor, StringStringInsensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringInsensitive, Name, fixtureName),
MapFixtureParamConstructor<string, string, IReadOnlyBiMap<string, string>>
.Construct(Ctor, StringStringSensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringSensitive, Name, fixtureName),
MapFixtureParamConstructor<int[], Type, IReadOnlyBiMap<int[], Type>>
.Construct(Ctor, ArrayIntType, Name, fixtureName),
.Construct(CompositeCtor, ArrayIntType, Name, fixtureName),
};
}
}
\ No newline at end of file
......@@ -16,16 +16,16 @@ namespace Anvoker.Maps.Tests.BiMap
{ get; } = new ITestFixtureData[]
{
MapFixtureParamConstructor<int, decimal, IReadOnlyBiMap<int, decimal>>
.Construct(Ctor, IntDecimal, Name, fixtureName),
.Construct(CompositeCtor, IntDecimal, Name, fixtureName),
MapFixtureParamConstructor<string, string, IReadOnlyBiMap<string, string>>
.Construct(Ctor, StringStringInsensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringInsensitive, Name, fixtureName),
MapFixtureParamConstructor<string, string, IReadOnlyBiMap<string, string>>
.Construct(Ctor, StringStringSensitive, Name, fixtureName),
.Construct(CompositeCtor, StringStringSensitive, Name, fixtureName),
MapFixtureParamConstructor<int[], Type, IReadOnlyBiMap<int[], Type>>
.Construct(Ctor, ArrayIntType, Name, fixtureName),
.Construct(CompositeCtor, ArrayIntType, Name, fixtureName),
};
}
}
\ No newline at end of file
......@@ -13,7 +13,7 @@ namespace Anvoker.Maps.Tests.MultiBiMap
where TVCol : IEnumerable<TV>
=> new CollectionEqualityComparer<TV, TVCol>(d.ComparerValue);
public static IMultiBiMap<TKey, TVal> Ctor<TKey, TVal>(
public static IMultiBiMap<TKey, TVal> CompositeCtor<TKey, TVal>(
MultiMapData<TKey, TVal> d)
{
var m = new CompositeMultiBiMap<TKey, TVal>(d.ComparerKey, d.ComparerValue);
......@@ -39,7 +39,7 @@ namespace Anvoker.Maps.Tests.MultiBiMap
{
return MultiMapFixtureParamConstructor<TK, TV, TVCol, TCollection>
.Construct(
(d) => (TCollection)Ctor(d),
(d) => (TCollection)CompositeCtor(d),
CtorVCol<TV, TVCol>,
ComparerCol<TK, TV, TVCol>,
data,
......
......@@ -13,7 +13,7 @@ namespace Anvoker.Maps.Tests.MultiMap
where TVCol : IEnumerable<TV>
=> new CollectionEqualityComparer<TV, TVCol>(d.ComparerValue);
public static IMultiMap<TKey, TVal> Ctor<TKey, TVal>(
public static IMultiMap<TKey, TVal> CompositeCtor<TKey, TVal>(
MultiMapData<TKey, TVal> d)
{
var m = new CompositeMultiMap<TKey, TVal>(d.ComparerKey, d.ComparerValue);
......@@ -39,7 +39,7 @@ namespace Anvoker.Maps.Tests.MultiMap
{
return MultiMapFixtureParamConstructor<TK, TV, TVCol, TCollection>
.Construct(
(d) => (TCollection)Ctor(d),
(d) => (TCollection)CompositeCtor(d),
CtorVCol<TV, TVCol>,
ComparerCol<TK, TV, TVCol>,
data,
......
......@@ -128,4 +128,4 @@
</PropertyGroup>
<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>
</Project>
</Project>
\ No newline at end of file
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