Skip to content

Instantly share code, notes, and snippets.

@bragma
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bragma/5e81048701a743c1f7b9 to your computer and use it in GitHub Desktop.
Save bragma/5e81048701a743c1f7b9 to your computer and use it in GitHub Desktop.
xUnit test for Hyde: try storing DateTime.MaxValue
[Fact]
public void TestMaxDateTime()
{
var partitionKey = "PK";
var rowKey = "RK";
var entity = new Entity { DT = DateTime.MaxValue };
_onlineStorage.Add(_tableName, entity, partitionKey, rowKey);
_onlineStorage.Save();
_localStorage.Add(_tableName, entity, partitionKey, rowKey);
_localStorage.Save();
var onlineEntity = _onlineStorage.Get<Entity>(_tableName, partitionKey, rowKey);
var localEntity = _localStorage.Get<Entity>(_tableName, partitionKey, rowKey);
Assert.Equal(DateTime.MaxValue, onlineEntity.DT);
Assert.Equal(DateTime.MaxValue, localEntity.DT);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment