public static void AssertIsEqual(TaskQueue actual, TaskQueue expected)
{
Assert.That(actual.Id, Is.EqualTo(expected.Id));
Assert.That(actual.UserId, Is.EqualTo(expected.UserId));
Assert.That(actual.ContentUrn, Is.EqualTo(expected.ContentUrn));
Assert.That(actual.Status, Is.EqualTo(expected.Status));
try
{
Assert.That(actual.CreatedDate, Is.EqualTo(expected.CreatedDate));
}
catch (Exception ex)
{
Log.Error("Trouble with DateTime precisions, trying Assert again with rounding to seconds", ex);
Assert.That(actual.CreatedDate.RoundToSecond(), Is.EqualTo(expected.CreatedDate.RoundToSecond()));
}
Assert.That(actual.Priority, Is.EqualTo(expected.Priority));
Assert.That(actual.NoOfAttempts, Is.EqualTo(expected.NoOfAttempts));
Assert.That(actual.ErrorMessage, Is.EqualTo(expected.ErrorMessage));
}