Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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;
            }
        }