public async Task AllSampleData() { var all = new LoadTaxis(); var aut = await all.TaxiFromPlateSqlite("CJ14BPW"); aut.ShouldNotBeNull(); aut.State.ShouldEqual(LicenceState.Valid); aut = await all.TaxiFromPlateSqlite("B30LOB"); aut.ShouldNotBeNull(); aut.State.ShouldEqual(LicenceState.Valid); aut = await all.TaxiFromPlateSqlite("TM69ALB"); aut.ShouldNotBeNull(); aut.State.ShouldEqual(LicenceState.Valid); aut = await all.TaxiFromPlateSqlite("NT10GNR"); aut.ShouldNotBeNull(); aut.State.ShouldEqual(LicenceState.Valid); aut = await all.TaxiFromPlateSqlite("BC01ASV"); aut.ShouldNotBeNull(); aut.State.ShouldEqual(LicenceState.Valid); //taxi from bucuresti in Bacau aut = await all.TaxiFromPlateSqlite("B01GPK"); aut.ShouldNotBeNull(); aut.State.ShouldEqual(LicenceState.Valid); }
public async Task AllSampleDataNoExtraChar() { var all = new LoadTaxis(); var aut = await all.TaxiFromPlateSqlite("B 30 LOB"); aut?.State.ShouldEqual(LicenceState.Valid); aut = await all.TaxiFromPlateSqlite("B-30-LOB"); aut?.State.ShouldEqual(LicenceState.Valid); aut = await all.TaxiFromPlateSqlite(" B 30 LOB "); aut?.State.ShouldEqual(LicenceState.Valid); }
public async Task <string[]> GetCities() { try { LoadTaxis lt = new LoadTaxis(); var data = await lt.GetCities(); return(data.OrderBy(it => it).ToArray()); } catch (Exception ex) { throw; } }
public async Task <TaxiAutorization> GetTaxi(string plateNumber) { Console.WriteLine("!!!getting " + plateNumber); try { var all = new LoadTaxis(); var res = await all.TaxiFromPlateSqlite(plateNumber); Console.WriteLine("!!! obtaining " + (res != null)); return(res); } catch (Exception ex) { Console.WriteLine("!!!exception " + ex.Message); Console.WriteLine("!!!exception " + ex.StackTrace); throw; } }
public async Task <string> GetRandomTaxiNumber() { var all = new LoadTaxis(); return(await all.GetRandomTaxiNumber()); }