Skip to content

Commit

Permalink
Ensure all .tt files are set to TextTemplatingFileGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsmith1968 committed Jan 1, 2020
1 parent 9446b7d commit f5da5a2
Show file tree
Hide file tree
Showing 27 changed files with 1,472 additions and 1,441 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(byte value, byte min, byte max, bool allowEitherOrder, IsB
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsByteExtensionsTestsSource), "GetLowerBound")]
public byte GetLowerBound(byte min, byte max, bool allowEitherOrder)
{
return MathsByteExtensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsByteExtensionsTestsSource), "GetLowerBound")]
public byte GetLowerBound(byte min, byte max, bool allowEitherOrder)
{
return MathsByteExtensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsByteExtensionsTestsSource), "GetUpperBound")]
public byte GetUpperBound(byte min, byte max, bool allowEitherOrder)
{
return MathsByteExtensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsByteExtensionsTestsSource), "GetUpperBound")]
public byte GetUpperBound(byte min, byte max, bool allowEitherOrder)
{
return MathsByteExtensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(DateTime value, DateTime min, DateTime max, bool allowEith
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsDateTimeExtensionsTestsSource), "GetLowerBound")]
public DateTime GetLowerBound(DateTime min, DateTime max, bool allowEitherOrder)
{
return MathsDateTimeExtensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsDateTimeExtensionsTestsSource), "GetLowerBound")]
public DateTime GetLowerBound(DateTime min, DateTime max, bool allowEitherOrder)
{
return MathsDateTimeExtensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsDateTimeExtensionsTestsSource), "GetUpperBound")]
public DateTime GetUpperBound(DateTime min, DateTime max, bool allowEitherOrder)
{
return MathsDateTimeExtensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsDateTimeExtensionsTestsSource), "GetUpperBound")]
public DateTime GetUpperBound(DateTime min, DateTime max, bool allowEitherOrder)
{
return MathsDateTimeExtensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(decimal value, decimal min, decimal max, bool allowEitherO
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsDecimalExtensionsTestsSource), "GetLowerBound")]
public decimal GetLowerBound(decimal min, decimal max, bool allowEitherOrder)
{
return MathsDecimalExtensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsDecimalExtensionsTestsSource), "GetLowerBound")]
public decimal GetLowerBound(decimal min, decimal max, bool allowEitherOrder)
{
return MathsDecimalExtensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsDecimalExtensionsTestsSource), "GetUpperBound")]
public decimal GetUpperBound(decimal min, decimal max, bool allowEitherOrder)
{
return MathsDecimalExtensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsDecimalExtensionsTestsSource), "GetUpperBound")]
public decimal GetUpperBound(decimal min, decimal max, bool allowEitherOrder)
{
return MathsDecimalExtensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(double value, double min, double max, bool allowEitherOrde
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsDoubleExtensionsTestsSource), "GetLowerBound")]
public double GetLowerBound(double min, double max, bool allowEitherOrder)
{
return MathsDoubleExtensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsDoubleExtensionsTestsSource), "GetLowerBound")]
public double GetLowerBound(double min, double max, bool allowEitherOrder)
{
return MathsDoubleExtensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsDoubleExtensionsTestsSource), "GetUpperBound")]
public double GetUpperBound(double min, double max, bool allowEitherOrder)
{
return MathsDoubleExtensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsDoubleExtensionsTestsSource), "GetUpperBound")]
public double GetUpperBound(double min, double max, bool allowEitherOrder)
{
return MathsDoubleExtensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
52 changes: 26 additions & 26 deletions Test.DNX.Helpers/Maths/BuiltInTypes/MathsExtensionsTestsTemplate.tt
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
<#
var types = new Dictionary<string, string>()
{
{ "Byte", "byte" },
{ "SByte", "sbyte" },
{ "Byte", "byte" },
{ "SByte", "sbyte" },

{ "DateTime", "DateTime" },
{ "DateTime", "DateTime" },

{ "Int16", "short" },
{ "UInt16", "ushort" },
{ "Int16", "short" },
{ "UInt16", "ushort" },

{ "Int32", "int" },
{ "UInt32", "uint" },
{ "Int32", "int" },
{ "UInt32", "uint" },

{ "Int64", "long" },
{ "UInt64", "ulong" },
{ "Int64", "long" },
{ "UInt64", "ulong" },

{ "Float", "float" },
{ "Double", "double" },
{ "Decimal", "decimal" },
{ "Float", "float" },
{ "Double", "double" },
{ "Decimal", "decimal" },
}; #>
<# manager.StartHeader(); #>
// Code generated by a Template
Expand All @@ -40,11 +40,11 @@ namespace Test.DNX.Helpers.Maths.BuiltInTypes
<#
foreach (var kvp in types)
{
var typeName = kvp.Value;
var typeDesc = kvp.Key;
var fileName = string.Format("Maths{0}ExtensionsTests.generated.cs", typeDesc);
var typeName = kvp.Value;
var typeDesc = kvp.Key;
var fileName = string.Format("Maths{0}ExtensionsTests.generated.cs", typeDesc);

manager.StartNewFile(fileName);
manager.StartNewFile(fileName);
#>
[TestFixture]
public class Maths<#= typeDesc #>ExtensionsTests
Expand Down Expand Up @@ -79,17 +79,17 @@ foreach (var kvp in types)
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(Maths<#= typeDesc #>ExtensionsTestsSource), "GetLowerBound")]
public <#= typeName #> GetLowerBound(<#= typeName #> min, <#= typeName #> max, bool allowEitherOrder)
{
return Maths<#= typeDesc #>Extensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(Maths<#= typeDesc #>ExtensionsTestsSource), "GetLowerBound")]
public <#= typeName #> GetLowerBound(<#= typeName #> min, <#= typeName #> max, bool allowEitherOrder)
{
return Maths<#= typeDesc #>Extensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(Maths<#= typeDesc #>ExtensionsTestsSource), "GetUpperBound")]
public <#= typeName #> GetUpperBound(<#= typeName #> min, <#= typeName #> max, bool allowEitherOrder)
{
return Maths<#= typeDesc #>Extensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(Maths<#= typeDesc #>ExtensionsTestsSource), "GetUpperBound")]
public <#= typeName #> GetUpperBound(<#= typeName #> min, <#= typeName #> max, bool allowEitherOrder)
{
return Maths<#= typeDesc #>Extensions.GetUpperBound(min, max, allowEitherOrder);
}
}
<# manager.EndBlock();
} #>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(float value, float min, float max, bool allowEitherOrder,
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsFloatExtensionsTestsSource), "GetLowerBound")]
public float GetLowerBound(float min, float max, bool allowEitherOrder)
{
return MathsFloatExtensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsFloatExtensionsTestsSource), "GetLowerBound")]
public float GetLowerBound(float min, float max, bool allowEitherOrder)
{
return MathsFloatExtensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsFloatExtensionsTestsSource), "GetUpperBound")]
public float GetUpperBound(float min, float max, bool allowEitherOrder)
{
return MathsFloatExtensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsFloatExtensionsTestsSource), "GetUpperBound")]
public float GetUpperBound(float min, float max, bool allowEitherOrder)
{
return MathsFloatExtensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(short value, short min, short max, bool allowEitherOrder,
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsInt16ExtensionsTestsSource), "GetLowerBound")]
public short GetLowerBound(short min, short max, bool allowEitherOrder)
{
return MathsInt16Extensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsInt16ExtensionsTestsSource), "GetLowerBound")]
public short GetLowerBound(short min, short max, bool allowEitherOrder)
{
return MathsInt16Extensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsInt16ExtensionsTestsSource), "GetUpperBound")]
public short GetUpperBound(short min, short max, bool allowEitherOrder)
{
return MathsInt16Extensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsInt16ExtensionsTestsSource), "GetUpperBound")]
public short GetUpperBound(short min, short max, bool allowEitherOrder)
{
return MathsInt16Extensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(int value, int min, int max, bool allowEitherOrder, IsBetw
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsInt32ExtensionsTestsSource), "GetLowerBound")]
public int GetLowerBound(int min, int max, bool allowEitherOrder)
{
return MathsInt32Extensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsInt32ExtensionsTestsSource), "GetLowerBound")]
public int GetLowerBound(int min, int max, bool allowEitherOrder)
{
return MathsInt32Extensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsInt32ExtensionsTestsSource), "GetUpperBound")]
public int GetUpperBound(int min, int max, bool allowEitherOrder)
{
return MathsInt32Extensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsInt32ExtensionsTestsSource), "GetUpperBound")]
public int GetUpperBound(int min, int max, bool allowEitherOrder)
{
return MathsInt32Extensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(long value, long min, long max, bool allowEitherOrder, IsB
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsInt64ExtensionsTestsSource), "GetLowerBound")]
public long GetLowerBound(long min, long max, bool allowEitherOrder)
{
return MathsInt64Extensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsInt64ExtensionsTestsSource), "GetLowerBound")]
public long GetLowerBound(long min, long max, bool allowEitherOrder)
{
return MathsInt64Extensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsInt64ExtensionsTestsSource), "GetUpperBound")]
public long GetUpperBound(long min, long max, bool allowEitherOrder)
{
return MathsInt64Extensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsInt64ExtensionsTestsSource), "GetUpperBound")]
public long GetUpperBound(long min, long max, bool allowEitherOrder)
{
return MathsInt64Extensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(sbyte value, sbyte min, sbyte max, bool allowEitherOrder,
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsSByteExtensionsTestsSource), "GetLowerBound")]
public sbyte GetLowerBound(sbyte min, sbyte max, bool allowEitherOrder)
{
return MathsSByteExtensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsSByteExtensionsTestsSource), "GetLowerBound")]
public sbyte GetLowerBound(sbyte min, sbyte max, bool allowEitherOrder)
{
return MathsSByteExtensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsSByteExtensionsTestsSource), "GetUpperBound")]
public sbyte GetUpperBound(sbyte min, sbyte max, bool allowEitherOrder)
{
return MathsSByteExtensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsSByteExtensionsTestsSource), "GetUpperBound")]
public sbyte GetUpperBound(sbyte min, sbyte max, bool allowEitherOrder)
{
return MathsSByteExtensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(ushort value, ushort min, ushort max, bool allowEitherOrde
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsUInt16ExtensionsTestsSource), "GetLowerBound")]
public ushort GetLowerBound(ushort min, ushort max, bool allowEitherOrder)
{
return MathsUInt16Extensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsUInt16ExtensionsTestsSource), "GetLowerBound")]
public ushort GetLowerBound(ushort min, ushort max, bool allowEitherOrder)
{
return MathsUInt16Extensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsUInt16ExtensionsTestsSource), "GetUpperBound")]
public ushort GetUpperBound(ushort min, ushort max, bool allowEitherOrder)
{
return MathsUInt16Extensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsUInt16ExtensionsTestsSource), "GetUpperBound")]
public ushort GetUpperBound(ushort min, ushort max, bool allowEitherOrder)
{
return MathsUInt16Extensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ public bool IsBetween(uint value, uint min, uint max, bool allowEitherOrder, IsB
return value.IsBetween(min, max, allowEitherOrder, boundsType);
}

[TestCaseSource(typeof(MathsUInt32ExtensionsTestsSource), "GetLowerBound")]
public uint GetLowerBound(uint min, uint max, bool allowEitherOrder)
{
return MathsUInt32Extensions.GetLowerBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsUInt32ExtensionsTestsSource), "GetLowerBound")]
public uint GetLowerBound(uint min, uint max, bool allowEitherOrder)
{
return MathsUInt32Extensions.GetLowerBound(min, max, allowEitherOrder);
}

[TestCaseSource(typeof(MathsUInt32ExtensionsTestsSource), "GetUpperBound")]
public uint GetUpperBound(uint min, uint max, bool allowEitherOrder)
{
return MathsUInt32Extensions.GetUpperBound(min, max, allowEitherOrder);
}
[TestCaseSource(typeof(MathsUInt32ExtensionsTestsSource), "GetUpperBound")]
public uint GetUpperBound(uint min, uint max, bool allowEitherOrder)
{
return MathsUInt32Extensions.GetUpperBound(min, max, allowEitherOrder);
}
}
}
Loading

0 comments on commit f5da5a2

Please sign in to comment.