Skip to content

Commit

Permalink
Test Date
Browse files Browse the repository at this point in the history
  • Loading branch information
geoperez committed Mar 5, 2019
1 parent a97ca7f commit cd13f2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/Unosquare.Swan.Test/Mocks/ObjectMapperMock.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
namespace Unosquare.Swan.Test.Mocks
{
using System;

public class User
{
public string Name { get; set; }

public string Email { get; set; }

public Role Role { get; set; }

public DateTime StartDate { get; set; }
}

public class Role
Expand All @@ -23,5 +27,7 @@ public class UserDto
public string Role { get; set; }

public bool IsAdmin { get; set; }

public DateTime StartDate { get; set; }
}
}
2 changes: 2 additions & 0 deletions test/Unosquare.Swan.Test/ObjectMapperTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public abstract class ObjectMapperTest : TestFixtureBase
Email = "geovanni.perez@unosquare.com",
Name = "Geo",
Role = new Role {Name = "Admin"},
StartDate = new DateTime(2000, 10, 13),
};

protected Dictionary<string, object> SourceDict => new Dictionary<string, object>
Expand All @@ -36,6 +37,7 @@ public void SimpleMap_ReturnsTrue()
Assert.IsNotNull(destination);
Assert.AreEqual(SourceUser.Name, destination.Name);
Assert.AreEqual(SourceUser.Email, destination.Email);
Assert.AreEqual(SourceUser.StartDate, destination.StartDate);
Assert.IsNull(destination.Role);
}

Expand Down

0 comments on commit cd13f2f

Please sign in to comment.