public void CreateSpecialty_SavesSpecialtyToDatabase_Specialty() { int newSpeciatlyId = Specialty.CreateSpecialty("test"); int result = Specialty.GetSpecialty(newSpeciatlyId).Id; Assert.AreEqual(newSpeciatlyId, result); }
public void GetSpecialty_ReturnSpecialtyById_Specialty() { int newSpecialtyId = Specialty.CreateSpecialty("test"); Specialty expected = new Specialty("test"); expected.Id = newSpecialtyId; Specialty result = Specialty.GetSpecialty(newSpecialtyId); Assert.AreEqual(expected, result); }
public IActionResult Create(string name) { Specialty.CreateSpecialty(name); return(RedirectToAction("Index")); }