Exemplo n.º 1
0
        public void DeleteAll_DeletesAllSpecialitiesFromDatabase_EmptySpecialityList()
        {
            Speciality testSpeciality1 = new Speciality("Cut");

            testSpeciality1.Save();
            Speciality testSpeciality2 = new Speciality("Color");

            testSpeciality2.Save();
            Stylist testStylist = new Stylist("Emmaline", "Has an experience in the beauty industry.");

            testStylist.Save();
            testSpeciality1.AddStylist(testStylist);
            testSpeciality2.AddStylist(testStylist);
            Speciality.DeleteAll();
            List <Speciality> resultStylistSpecialities = testStylist.GetSpecialities();
            List <Speciality> testStylistSpecialities   = new List <Speciality> {
            };

            CollectionAssert.AreEqual(resultStylistSpecialities, testStylistSpecialities);
        }
Exemplo n.º 2
0
 public ActionResult DeleteAll()
 {
     Speciality.DeleteAll();
     return(RedirectToAction("Index", "Home"));
 }
 public void Dispose()
 {
     Client.DeleteAll();
     Stylist.DeleteAll();
     Speciality.DeleteAll();
 }
Exemplo n.º 4
0
 public ActionResult DeleteAll()
 {
     Speciality.DeleteAll();
     return(View());
 }
Exemplo n.º 5
0
 public void Dispose()
 {
     Speciality.DeleteAll();
 }