public async Task Abandon() { var queue = Substitute.For <IStorageQueue>(); var message = new CloudQueueMessage("ship"); var sqm = new StorageQueuedMessage <object>(queue, message); await sqm.Abandon(); }
public async Task Complete() { var queue = Substitute.For <IStorageQueue>(); var message = new CloudQueueMessage("ship"); await queue.Delete(message); var sqm = new StorageQueuedMessage <object>(queue, message); await sqm.Complete(); await queue.Received().Delete(message); }
public async Task Data() { var expected = new Helper() { Test = Guid.NewGuid(), }; var json = JsonConvert.SerializeObject(expected); var queue = Substitute.For <IStorageQueue>(); var message = new CloudQueueMessage(json); var sqm = new StorageQueuedMessage <Helper>(queue, message); var data = await sqm.Data(); Assert.IsNotNull(data); Assert.AreEqual(expected.Test, data.Test); }