mirror of
https://github.com/claunia/plist-cil.git
synced 2025-12-16 19:14:26 +00:00
27 lines
742 B
C#
27 lines
742 B
C#
using System;
|
|
using Claunia.PropertyList;
|
|
using Xunit;
|
|
|
|
namespace plistcil.test
|
|
{
|
|
public class NSDateTests
|
|
{
|
|
[Fact]
|
|
public static void ConstructorTest()
|
|
{
|
|
var actual = new NSDate("2000-01-01T00:00:00Z");
|
|
var expected = new DateTime(2000, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
|
Assert.Equal(expected, actual.Date.ToUniversalTime());
|
|
}
|
|
|
|
[Fact]
|
|
public static void MakeDateStringTest()
|
|
{
|
|
var date = new DateTime(2000, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
|
string expected = "2000-01-01T00:00:00Z";
|
|
string actual = NSDate.MakeDateString(date);
|
|
|
|
Assert.Equal(expected, actual);
|
|
}
|
|
}
|
|
} |