GetAsync() private method

private GetAsync ( ) : Task
return Task
        public async Task GetAll()
        {
            ServiceCancellation cancelSource = new ServiceCancellation(CancellationToken.None);
            MockReliableStateManager stateManager = new MockReliableStateManager();

            IReliableDictionary<string, DeviceEvent> store =
                await stateManager.GetOrAddAsync<IReliableDictionary<string, DeviceEvent>>(DataService.EventDictionaryName);

            Dictionary<string, DeviceEvent> expected = new Dictionary<string, DeviceEvent>();
            expected.Add("device1", new DeviceEvent(DateTimeOffset.UtcNow.Subtract(TimeSpan.FromMinutes(1))));
            expected.Add("device2", new DeviceEvent(DateTimeOffset.UtcNow.Subtract(TimeSpan.FromMinutes(2))));
               

            using (ITransaction tx = stateManager.CreateTransaction())
            {
                foreach (var item in expected)
                {
                    await store.SetAsync(tx, item.Key, item.Value);
                }
            }

            DevicesController target = new DevicesController(stateManager, cancelSource);
            IActionResult result = await target.GetAsync();

            Assert.True(result is OkObjectResult);

            IEnumerable<dynamic> actual = ((OkObjectResult) result).Value as IEnumerable<dynamic>;

            foreach (dynamic item in actual)
            {
                Assert.Equal< DateTimeOffset>(expected[item.Id].Timestamp, item.Timestamp);
            }
        }
        public async Task GetAllEmpty()
        {
            ServiceCancellation cancelSource = new ServiceCancellation(CancellationToken.None);
            MockReliableStateManager stateManager = new MockReliableStateManager();

            IReliableDictionary<string, DeviceEvent> store =
                await stateManager.GetOrAddAsync<IReliableDictionary<string, DeviceEvent>>(DataService.EventDictionaryName);

            DevicesController target = new DevicesController(stateManager, cancelSource);
            IActionResult result = await target.GetAsync();

            Assert.True(result is OkObjectResult);

            IEnumerable<dynamic> actual = ((OkObjectResult) result).Value as IEnumerable<dynamic>;

            Assert.False(actual.Any());
        }