public void CacheIsCleared() { var fileProviderTest = new LocalZipMapFileProviderTest(); var dataProviderTest = new DefaultDataProviderTest(); fileProviderTest.Initialize(dataProviderTest); fileProviderTest.Get(QuantConnect.Market.USA); Assert.AreEqual(1, dataProviderTest.FetchCount); Thread.Sleep(50); fileProviderTest.Get(QuantConnect.Market.USA); Assert.AreEqual(1, dataProviderTest.FetchCount); Thread.Sleep(1000); fileProviderTest.Get(QuantConnect.Market.USA); Assert.AreEqual(2, dataProviderTest.FetchCount); fileProviderTest.Enabled = false; dataProviderTest.DisposeSafely(); }
public void CacheIsCleared() { var fileProviderTest = new LocalZipMapFileProviderTest(); var dataProviderTest = new DefaultDataProviderTest(); fileProviderTest.Initialize(dataProviderTest); fileProviderTest.CacheCleared.Reset(); fileProviderTest.Get(AuxiliaryDataKey.EquityUsa); Assert.AreEqual(1, dataProviderTest.FetchCount); Thread.Sleep(50); fileProviderTest.Get(AuxiliaryDataKey.EquityUsa); Assert.AreEqual(1, dataProviderTest.FetchCount); fileProviderTest.CacheCleared.WaitOne(TimeSpan.FromSeconds(2)); fileProviderTest.Get(AuxiliaryDataKey.EquityUsa); Assert.AreEqual(2, dataProviderTest.FetchCount); fileProviderTest.Enabled = false; dataProviderTest.DisposeSafely(); }
public void Retrieves() { var fileProviderTest = new LocalZipMapFileProviderTest(); var dataProviderTest = new DefaultDataProviderTest(); fileProviderTest.Initialize(dataProviderTest); var mapFileResolver = fileProviderTest.Get(QuantConnect.Market.USA); fileProviderTest.Enabled = false; dataProviderTest.DisposeSafely(); Assert.IsNotEmpty(mapFileResolver); }
public void Retrieves() { var fileProviderTest = new LocalZipMapFileProviderTest(); var dataProviderTest = new DefaultDataProviderTest(); fileProviderTest.Initialize(dataProviderTest); var mapFileResolver = fileProviderTest.Get(AuxiliaryDataKey.EquityUsa); fileProviderTest.Enabled = false; dataProviderTest.DisposeSafely(); Assert.IsNotEmpty(mapFileResolver); }