Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ContinentDatabase continentDatabase = new ContinentDatabase();

            ContinentList.DataSource     = continentDatabase.getAllContinent();
            ContinentList.DataTextField  = "title";
            ContinentList.DataValueField = "id";
            ContinentList.DataBind();
            loadTable();

            if (Request.QueryString["id"] != null)
            {
                id = int.Parse(Request.QueryString["id"]);
                AddCountry.Text = "Update Country";
                CountryDatabase countryDatbase = new CountryDatabase();
                CountryModel    countryModel   = countryDatbase.getCountry(id);
                ContinentList.Items.FindByValue(countryModel.ContinentId.ToString());
                //countryTxtbox.Text = countryModel.Name;
            }
        }
Ejemplo n.º 2
0
        public void IdShouldMatchContinent(int id, string continentName)
        {
            var sut = new ContinentList();

            sut.GetContinent(id).Should().Be(continentName);
        }
Ejemplo n.º 3
0
        public void ContinentListShouldExist()
        {
            var sut = new ContinentList();

            sut.Should().NotBeNull();
        }
Ejemplo n.º 4
0
        public void ContinentListShouldContainAllColors()
        {
            var sut = new ContinentList();

            sut.Count.Should().Be(6);
        }
Ejemplo n.º 5
0
 public void UpdateContinents()
 {
     _continents = ContinentList.Create(this);
 }