public void UpdateForSave_ShouldSetModifiedTime() { var dataModel = new Post(); var theDate = DateTime.Now; dataModel.UpdateForSave(theDate); Assert.That(dataModel.ModifiedDate, Is.EqualTo(theDate)); }
public void UpdateForSave_ShouldSetCreatedTime_WhenIdNotSet() { var dataModel = new Post(); var theDate = DateTime.Now; dataModel.UpdateForSave(theDate); Assert.That(dataModel.CreatedDate, Is.EqualTo(theDate)); }