/// <summary> /// See interface docs. /// </summary> /// <param name="icaos"></param> /// <param name="baseStationAircraft"></param> /// <returns></returns> public Dictionary <string, AircraftOnlineLookupDetail> LookupMany(IEnumerable <string> icaos, IDictionary <string, BaseStationAircraft> baseStationAircraft) { Initialise(); var uniqueIcaos = icaos.Where(r => r != null && r.Length == 6).Select(r => r.ToUpper()).Distinct().ToArray(); var result = FetchManyAircraftDetailsFromCache(uniqueIcaos, baseStationAircraft); var refreshIcaos = result.Where(r => RecordNeedsRefresh(r.Value)).Select(r => r.Key).ToArray(); if (refreshIcaos.Length > 0) { _AircraftOnlineLookup.LookupMany(refreshIcaos); } return(result); }
public void AircraftOnlineLookup_Provider_Filled_On_Call_To_LookupMany() { _Lookup.LookupMany(new string[] { "ABC123", "123456" }); Assert.IsNotNull(_Lookup.Provider); }