public void TestarDeletarClinica()
        {
            Clinica test = new Clinica(150, "", dataInauguracao, endereco, estoque);

            str = bll.Delete(test);

            Assert.AreEqual(str, "Clínica deletada com êxito!");
        }
        public IActionResult Clinica(string saveBtn2, DateTime inauguracao, string saveBtn, string nomeClinica, string state, string city, string bairro, string logradouro, string cep, int numeroCasa, int idSelecionado)
        {
            if (saveBtn2 == "Deletar")
            {
                ClinicaBLL bll      = new ClinicaBLL();
                Clinica    clinica  = new Clinica();
                Endereco   endereco = new Endereco();

                clinica.Id = idSelecionado;

                ViewData["result"] = bll.Delete(clinica);

                return(View());
            }

            if (idSelecionado != 0)
            {
                ClinicaBLL  bll         = new ClinicaBLL();
                Estoque     estoque     = new Estoque();
                EnderecoBLL enderecoBLL = new EnderecoBLL();
                estoque.Id = 2;

                Clinica clinica = new Clinica(idSelecionado, nomeClinica, inauguracao, enderecoBLL.EnderecoConstruido("Brasil", state, city, bairro, logradouro, numeroCasa, cep), estoque);

                ViewData["result"] = bll.Update(clinica);
                return(View());
            }

            if (saveBtn == "Salvar")
            {
                ClinicaBLL  bll         = new ClinicaBLL();
                Estoque     estoque     = new Estoque();
                EnderecoBLL enderecoBLL = new EnderecoBLL();
                estoque.Id = 2;

                Clinica clinica = new Clinica(idSelecionado, nomeClinica, inauguracao, enderecoBLL.EnderecoConstruido("Brasil", state, city, bairro, logradouro, numeroCasa, cep), estoque);

                ViewData["result"] = bll.Insert(clinica);
                return(View());
            }
            return(View());
        }