public void CashedStoragePostCommandNotCompleted() { var cache = new CachedDataAccessor(this._dataDriver); var beforeRun = cache.PostDataAsync(new EntityMetadata { StartAddress = 1000 }, new Byte[] { 1, 2, 3, 5 }, new CancellationToken()).IsCompleted; cache.PostDataAsync(new EntityMetadata { StartAddress = 1000 }, new Byte[] { 1, 2, 3, 5 }, new CancellationToken()).RunSynchronously(); beforeRun.Should().Be(false); }
public void CashedStorageGetCommandNotFailed() { var cache = new CachedDataAccessor(this._dataDriver); cache.PostDataAsync(null, null, new CancellationToken()).IsFaulted.Should().Be(false); }
public void CashedStoragePostCommandAndThenReadInformationFromCache() { var cache = new CachedDataAccessor(this._dataDriver); cache.PostDataAsync(new EntityMetadata { StartAddress = 1000 }, new Byte[] { 1, 2, 3, 5 }, new CancellationToken()).RunSynchronously(); cache.GetDataAsync(new EntityMetadata { StartAddress = 1000, NumberOfPoints = 10 }, new CancellationToken()).RunSynchronously(); }