public ActionResult Create(string city, int year, string monument, int id)
        {
            PlaceBeen newPlaceBeen = new PlaceBeen(city, year, monument, id);

            newPlaceBeen.Save();
            return(View("Cities", PlaceBeen.GetAll()));
        }
Example #2
0
        public void GetMonument_ReturnMonument()
        {
            //Arrange
            string    city         = "new york";
            int       year         = 2005;
            string    monument     = "statue of liberty";
            PlaceBeen newPlaceBeen = new PlaceBeen(city, year, monument);

            //Act
            //Arrange
            Assert.AreEqual(monument, "statue of liberty");
        }
Example #3
0
        public void GetCity_ReturnCity()
        {
            //Arrange
            string    city         = "seattle";
            int       year         = 1999;
            string    monument     = "space needle";
            PlaceBeen newPlaceBeen = new PlaceBeen(city, year, monument);

            //Act
            //Arrange
            Assert.AreEqual(city, "seattle");
            Assert.AreEqual(year, 1999);
        }
Example #4
0
        public void GetID_ReturnID()
        {
            //Arrange
            string    city         = "Barcelona";
            int       year         = 2006;
            string    monument     = "Camp Nou";
            int       id           = 0;
            PlaceBeen newPlaceBeen = new PlaceBeen(city, year, monument, id);

            //Act
            ++id;
            //Arrange
            Assert.AreEqual(id, 1);
        }
 public ActionResult Cities()
 {
     return(View(PlaceBeen.GetAll()));
 }