public void CreateRow() { var playerFeed = new PlayerFeed { Url = "a" }; var playerFeedRow = PlayerFeedRow.CreateRow(playerFeed, DateTime.UtcNow); Assert.AreEqual("0", playerFeedRow.PartitionKey); Assert.AreEqual("a", playerFeedRow.Url); Assert.IsNull(playerFeedRow.LastSyncTimeUtc); Assert.IsNull(playerFeedRow.LastSyncWithChangesTimeUtc); }
public void CreateRequeuedRow() { var rowKeyTimeUtc = DateTime.UtcNow; var requeuedRowKeyTimeUtc = DateTime.UtcNow.AddTicks(1); var playerFeed = new PlayerFeed { Url = "a" }; var playerFeedRow = PlayerFeedRow.CreateRow(playerFeed, rowKeyTimeUtc); var requeuedPlayerFeedRow = playerFeedRow.CreateRequeuedRow( syncTimeUtc: requeuedRowKeyTimeUtc, syncFoundChanges: true); Assert.AreEqual(requeuedRowKeyTimeUtc, requeuedPlayerFeedRow.LastSyncTimeUtc); Assert.AreEqual(requeuedRowKeyTimeUtc, requeuedPlayerFeedRow.LastSyncWithChangesTimeUtc); var reRequeuedRowKeyTimeUtc = DateTime.UtcNow.AddTicks(2); var reRequeuedPlayerFeedRow = requeuedPlayerFeedRow.CreateRequeuedRow( syncTimeUtc: reRequeuedRowKeyTimeUtc, syncFoundChanges: false); Assert.AreEqual(reRequeuedRowKeyTimeUtc, reRequeuedPlayerFeedRow.LastSyncTimeUtc); Assert.AreEqual(requeuedRowKeyTimeUtc, reRequeuedPlayerFeedRow.LastSyncWithChangesTimeUtc); }