public MedicalHealthFacility GetHealthFacilityById(int id)
        {
            HealthFacilityContext        context = HttpContext.RequestServices.GetService(typeof(HealthFacilityContext)) as HealthFacilityContext;
            GetHealthFacilityByIdHandler handler = new GetHealthFacilityByIdHandler(context);

            return(handler.Handle(id));
        }
        public void GetTestByIdTest()
        {
            // arrange
            List <MedicalHealthFacility> list = new List <MedicalHealthFacility>();

            int id = 2;

            MedicalHealthFacility expected = new MedicalHealthFacility
            {
                Name    = "Facility#3",
                Address = new Address {
                    Street = "street", City = "city", Country = "country", House = 11
                }
            };

            //act
            HealthFacilityContext        context = new HealthFacilityContext(connString);
            GetHealthFacilityByIdHandler handler = new GetHealthFacilityByIdHandler(context);

            handler.Handle(id);


            using (conn = new MySqlConnection(connString))
            {
                conn.Open();
                string query = string.Format("select * from health_facilities where faculty_id=2");

                MySqlCommand cmd = new MySqlCommand(query, conn);

                using (var reader = cmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        string  addressString = reader["address"].ToString();
                        Address address       = Converter.ConvertToAddress(addressString);
                        list.Add(new MedicalHealthFacility()
                        {
                            Id      = Convert.ToInt32(reader["faculty_id"]),
                            Name    = reader["name"].ToString(),
                            Address = address,
                        });
                    }
                }
            }

            if (list[0].Name == expected.Name && list[0].Address == expected.Address)
            {
                Assert.IsTrue(true);
            }
        }