Skip to content

Commit

Permalink
Add tests for Date. Fix #133
Browse files Browse the repository at this point in the history
  • Loading branch information
nilproject committed May 3, 2018
1 parent 27568a1 commit fbd533b
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 147 deletions.
15 changes: 15 additions & 0 deletions IntegrationTests/BaseLibrary/DateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ namespace IntegrationTests.BaseLibrary
[TestClass]
public class DateTests
{
[TestMethod]
public void ShouldParseUSformat()
{
var date = new Date(new Arguments { "10/31/2010 08:00" });
Assert.AreEqual(DateTime.Parse("2010-10-31 08:00"), date.ToDateTime());
}

[TestMethod]
public void ShouldGiveISOString()
{
var expected = "1970-01-01T00:00:00.000Z";
var date = new Date(new Arguments { "1970" });
Assert.AreEqual(date.toISOString(), expected);
}

[TestMethod]
public void NewDateShouldContainCurrentTime()
{
Expand Down
Loading

0 comments on commit fbd533b

Please sign in to comment.