Esempio n. 1
0
 public static void DropAll()
 {
     if (test == true)
     {
         Pessoa.Drop();
         Fisioterapeuta.Drop();
         Paciente.Drop();
         Musculo.Drop();
         Movimento.Drop();
         Sessao.Drop();
         Exercicio.Drop();
         MovimentoMusculo.Drop();
         PontosRotuloPaciente.Drop();
         PontosRotuloFisioterapeuta.Drop();
     }
 }
        public static void TestPhysiotherapistLabelPointsDrop()
        {
            using (var conn = new SqliteConnection(GlobalController.path))
            {
                conn.Open();

                PontosRotuloFisioterapeuta.Drop();

                var check = "SELECT count(*) FROM sqlite_master WHERE type='table' AND name='PONTOSROTULOFISIOTERAPEUTA';";

                var result = 0;

                using (var cmd = new SqliteCommand(check, conn))
                {
                    using (IDataReader reader = cmd.ExecuteReader())
                    {
                        try
                        {
                            while (reader.Read())
                            {
                                if (!reader.IsDBNull(0))
                                {
                                    result = reader.GetInt32(0);
                                }
                            }
                        }
                        finally
                        {
                            reader.Dispose();
                            reader.Close();
                        }
                    }
                    cmd.Dispose();
                }

                Assert.AreEqual(result, 0);

                conn.Dispose();
                conn.Close();
            }
            return;
        }