1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-09 22:55:42 +00:00

Remove _ from test names

This commit is contained in:
Oliver Booth 2022-04-21 22:31:32 +01:00
parent 4096265006
commit 118eeae46a
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
14 changed files with 43 additions and 43 deletions

View File

@ -8,49 +8,49 @@ namespace X10D.Tests.Net;
public class EndPointTests
{
[TestMethod]
public void GetHost_Null_ShouldThrow()
public void GetHostNullShouldThrow()
{
Assert.ThrowsException<ArgumentNullException>(() => ((IPEndPoint?)null)!.GetHost());
Assert.ThrowsException<ArgumentNullException>(() => ((DnsEndPoint?)null)!.GetHost());
}
[TestMethod]
public void GetPort_Null_ShouldThrow()
public void GetPortNullShouldThrow()
{
Assert.ThrowsException<ArgumentNullException>(() => ((IPEndPoint?)null)!.GetPort());
Assert.ThrowsException<ArgumentNullException>(() => ((DnsEndPoint?)null)!.GetPort());
}
[TestMethod]
public void DnsEndPoint_GetHost_Localhost()
public void DnsEndPointGetHostLocalhost()
{
var endPoint = new DnsEndPoint("localhost", 1234);
Assert.AreEqual("localhost", endPoint.GetHost());
}
[TestMethod]
public void DnsEndPoint_GetPort_1234()
public void DnsEndPointGetPort1234()
{
var endPoint = new DnsEndPoint("localhost", 1234);
Assert.AreEqual(1234, endPoint.GetPort());
}
[TestMethod]
public void IPEndPoint_IPv4_Loopback_GetHost_127_0_0_1()
public void IPEndPointIPv4LoopbackGetHost127001()
{
var endPoint = new IPEndPoint(IPAddress.Loopback, 1234);
Assert.AreEqual("127.0.0.1", endPoint.GetHost());
}
[TestMethod]
public void IPEndPoint_IPv6_Loopback_GetHost_ColonColon1()
public void IPEndPointIPv6LoopbackGetHostColonColon1()
{
var endPoint = new IPEndPoint(IPAddress.IPv6Loopback, 1234);
Assert.AreEqual("::1", endPoint.GetHost());
}
[TestMethod]
public void IPEndPoint_GetPort_1234()
public void IPEndPointGetPort1234()
{
var endPoint = new IPEndPoint(IPAddress.Loopback, 1234);
Assert.AreEqual(1234, endPoint.GetPort());

View File

@ -7,7 +7,7 @@ namespace X10D.Tests.Time;
public class ByteTests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, ((byte)0).Ticks());
Assert.AreEqual(TimeSpan.Zero, ((byte)0).Milliseconds());
@ -19,7 +19,7 @@ public class ByteTests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(((byte)1).Ticks() > TimeSpan.Zero);
Assert.IsTrue(((byte)1).Milliseconds() > TimeSpan.Zero);

View File

@ -7,7 +7,7 @@ namespace X10D.Tests.Time;
public class DecimalTests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, 0m.Milliseconds());
Assert.AreEqual(TimeSpan.Zero, 0m.Seconds());
@ -18,7 +18,7 @@ public class DecimalTests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(1m.Milliseconds() > TimeSpan.Zero);
Assert.IsTrue(1m.Seconds() > TimeSpan.Zero);
@ -29,7 +29,7 @@ public class DecimalTests
}
[TestMethod]
public void MinusOne_Should_Be_Negative()
public void MinusOneShouldBeNegative()
{
Assert.IsTrue((-1m).Milliseconds() < TimeSpan.Zero);
Assert.IsTrue((-1m).Seconds() < TimeSpan.Zero);

View File

@ -19,7 +19,7 @@ public class DoubleTests
}
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, _zero.Milliseconds());
Assert.AreEqual(TimeSpan.Zero, _zero.Seconds());
@ -30,7 +30,7 @@ public class DoubleTests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(_one.Milliseconds() > TimeSpan.Zero);
Assert.IsTrue(_one.Seconds() > TimeSpan.Zero);
@ -41,7 +41,7 @@ public class DoubleTests
}
[TestMethod]
public void MinusOne_Should_Be_Negative()
public void MinusOneShouldBeNegative()
{
Assert.IsTrue((_negativeOne).Milliseconds() < TimeSpan.Zero);
Assert.IsTrue((_negativeOne).Seconds() < TimeSpan.Zero);

View File

@ -7,7 +7,7 @@ namespace X10D.Tests.Time;
public class HalfTests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, 0.0.Milliseconds());
Assert.AreEqual(TimeSpan.Zero, 0.0.Seconds());
@ -18,7 +18,7 @@ public class HalfTests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(1.0.Milliseconds() > TimeSpan.Zero);
Assert.IsTrue(1.0.Seconds() > TimeSpan.Zero);
@ -29,7 +29,7 @@ public class HalfTests
}
[TestMethod]
public void MinusOne_Should_Be_Negative()
public void MinusOneShouldBeNegative()
{
Assert.IsTrue((-1.0).Milliseconds() < TimeSpan.Zero);
Assert.IsTrue((-1.0).Seconds() < TimeSpan.Zero);

View File

@ -7,7 +7,7 @@ namespace X10D.Tests.Time;
public class Int16Tests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, ((short)0).Ticks());
Assert.AreEqual(TimeSpan.Zero, ((short)0).Milliseconds());
@ -19,7 +19,7 @@ public class Int16Tests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(((short)1).Ticks() > TimeSpan.Zero);
Assert.IsTrue(((short)1).Milliseconds() > TimeSpan.Zero);
@ -31,7 +31,7 @@ public class Int16Tests
}
[TestMethod]
public void MinusOne_Should_Be_Negative()
public void MinusOneShouldBeNegative()
{
Assert.IsTrue(((short)-1).Ticks() < TimeSpan.Zero);
Assert.IsTrue(((short)-1).Milliseconds() < TimeSpan.Zero);

View File

@ -7,7 +7,7 @@ namespace X10D.Tests.Time;
public class Int32Tests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, 0.Ticks());
Assert.AreEqual(TimeSpan.Zero, 0.Milliseconds());
@ -19,7 +19,7 @@ public class Int32Tests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(1.Ticks() > TimeSpan.Zero);
Assert.IsTrue(1.Milliseconds() > TimeSpan.Zero);
@ -31,7 +31,7 @@ public class Int32Tests
}
[TestMethod]
public void MinusOne_Should_Be_Negative()
public void MinusOneShouldBeNegative()
{
Assert.IsTrue((-1).Ticks() < TimeSpan.Zero);
Assert.IsTrue((-1).Milliseconds() < TimeSpan.Zero);

View File

@ -7,7 +7,7 @@ namespace X10D.Tests.Time;
public class Int64Tests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, 0L.Ticks());
Assert.AreEqual(TimeSpan.Zero, 0L.Milliseconds());
@ -19,7 +19,7 @@ public class Int64Tests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(1L.Ticks() > TimeSpan.Zero);
Assert.IsTrue(1L.Milliseconds() > TimeSpan.Zero);
@ -31,7 +31,7 @@ public class Int64Tests
}
[TestMethod]
public void MinusOne_Should_Be_Negative()
public void MinusOneShouldBeNegative()
{
Assert.IsTrue((-1L).Ticks() < TimeSpan.Zero);
Assert.IsTrue((-1L).Milliseconds() < TimeSpan.Zero);

View File

@ -8,7 +8,7 @@ namespace X10D.Tests.Time;
public class SByteTests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, ((sbyte)0).Ticks());
Assert.AreEqual(TimeSpan.Zero, ((sbyte)0).Milliseconds());
@ -20,7 +20,7 @@ public class SByteTests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(((sbyte)1).Ticks() > TimeSpan.Zero);
Assert.IsTrue(((sbyte)1).Milliseconds() > TimeSpan.Zero);
@ -32,7 +32,7 @@ public class SByteTests
}
[TestMethod]
public void MinusOne_Should_Be_Negative()
public void MinusOneShouldBeNegative()
{
Assert.IsTrue(((sbyte)-1).Ticks() < TimeSpan.Zero);
Assert.IsTrue(((sbyte)-1).Milliseconds() < TimeSpan.Zero);

View File

@ -7,7 +7,7 @@ namespace X10D.Tests.Time;
public class SingleTests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, 0f.Milliseconds());
Assert.AreEqual(TimeSpan.Zero, 0f.Seconds());
@ -18,7 +18,7 @@ public class SingleTests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(1f.Milliseconds() > TimeSpan.Zero);
Assert.IsTrue(1f.Seconds() > TimeSpan.Zero);
@ -29,7 +29,7 @@ public class SingleTests
}
[TestMethod]
public void MinusOne_Should_Be_Negative()
public void MinusOneShouldBeNegative()
{
Assert.IsTrue((-1f).Milliseconds() < TimeSpan.Zero);
Assert.IsTrue((-1f).Seconds() < TimeSpan.Zero);

View File

@ -15,26 +15,26 @@ public class TimeSpanTests
}
[TestMethod]
public void Ago_Should_Be_In_The_Past()
public void AgoShouldBeInThePast()
{
Assert.IsTrue(_timeSpan.Ago() < DateTime.Now);
}
[TestMethod]
public void FromNow_Should_Be_In_The_Past()
public void FromNowShouldBeInThePast()
{
Assert.IsTrue(_timeSpan.FromNow() > DateTime.Now);
}
[TestMethod]
public void One_Day_Ago_Should_Be_Yesterday()
public void OneDayAgoShouldBeYesterday()
{
DateTime yesterday = DateTime.Now.AddDays(-1);
Assert.AreEqual(yesterday.Date, 1.Days().Ago().Date);
}
[TestMethod]
public void One_Day_FromNow_Should_Be_Tomorrow()
public void OneDayFromNowShouldBeTomorrow()
{
DateTime tomorrow = DateTime.Now.AddDays(1);
Assert.AreEqual(tomorrow.Date, 1.Days().FromNow().Date);

View File

@ -8,7 +8,7 @@ namespace X10D.Tests.Time;
public class UInt16Tests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, ((ushort)0).Ticks());
Assert.AreEqual(TimeSpan.Zero, ((ushort)0).Milliseconds());
@ -20,7 +20,7 @@ public class UInt16Tests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(((ushort)1).Ticks() > TimeSpan.Zero);
Assert.IsTrue(((ushort)1).Milliseconds() > TimeSpan.Zero);

View File

@ -8,7 +8,7 @@ namespace X10D.Tests.Time;
public class UInt32Tests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, 0U.Ticks());
Assert.AreEqual(TimeSpan.Zero, 0U.Milliseconds());
@ -20,7 +20,7 @@ public class UInt32Tests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(1U.Ticks() > TimeSpan.Zero);
Assert.IsTrue(1U.Milliseconds() > TimeSpan.Zero);

View File

@ -8,7 +8,7 @@ namespace X10D.Tests.Time;
public class UInt64Tests
{
[TestMethod]
public void Zero_Should_Be_Zero_TimeSpan()
public void ZeroShouldBeZeroTimeSpan()
{
Assert.AreEqual(TimeSpan.Zero, 0UL.Ticks());
Assert.AreEqual(TimeSpan.Zero, 0UL.Milliseconds());
@ -20,7 +20,7 @@ public class UInt64Tests
}
[TestMethod]
public void One_Should_Be_Positive()
public void OneShouldBePositive()
{
Assert.IsTrue(1UL.Ticks() > TimeSpan.Zero);
Assert.IsTrue(1UL.Milliseconds() > TimeSpan.Zero);