mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
refactor: Changed DateTime extension method to a simple util method
This commit is contained in:
parent
dc1b60e629
commit
027c9ffe82
8 changed files with 55 additions and 23 deletions
|
|
@ -1,21 +1,10 @@
|
|||
using System;
|
||||
using ICD.Common.Utils.Extensions;
|
||||
using NUnit.Framework;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace ICD.Common.Utils.Tests.Extensions
|
||||
{
|
||||
[TestFixture]
|
||||
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 void ToShortTimeStringTest()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue