mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-13 11:44:57 +00:00
feat: Added an extension method for getting the hour in 12 hour format
This commit is contained in:
@@ -1,18 +1,29 @@
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using ICD.Common.Utils.Extensions;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace ICD.Common.Utils.Tests.Extensions
|
||||
{
|
||||
[TestFixture]
|
||||
public sealed class DateTimeExtensionsTest
|
||||
{
|
||||
[Test]
|
||||
public static void ToShortTimeStringTest()
|
||||
{
|
||||
Assert.Inconclusive();
|
||||
}
|
||||
public sealed class DateTimeExtensionsTest
|
||||
{
|
||||
[TestCase(1, 1)]
|
||||
[TestCase(0, 12)]
|
||||
[TestCase(12, 12)]
|
||||
[TestCase(23, 11)]
|
||||
public void Get12Hour(int hour, int expected)
|
||||
{
|
||||
Assert.AreEqual(expected, new DateTime(2019, 1, 1, hour, 0, 0).Get12Hour());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void ToLongTimeStringWithMillisecondsTest()
|
||||
public void ToShortTimeStringTest()
|
||||
{
|
||||
Assert.Inconclusive();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToLongTimeStringWithMillisecondsTest()
|
||||
{
|
||||
Assert.Inconclusive();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user