public void NewProjectAndGetAllProjects()
        {
            // Arrange & Act
            Species species  = new Species(1, "Vogel");
            Project expected = new Project("Roermond", "link", DateTime.Now, species.ID);
            int     x        = pl.GetAllProjects().Count;

            pl.NewProject("Roermond", "link", DateTime.Now, species.ID);

            // Assert
            Assert.AreEqual(x + 1, pl.GetAllProjects().Count);
        }
Beispiel #2
0
 public ActionResult Create(FormCollection collection)
 {
     try
     {
         // TODO: Add insert logic here
         logic.NewProject(collection["name"], collection["map"], DateTime.Now, Convert.ToInt32(collection["speciesID"]));
         return(RedirectToAction("Index", "Project"));
     }
     catch
     {
         return(RedirectToAction("Index", "Home"));
     }
 }