public void TestEventCreation() { Boolean InsertCompleted = false; Boolean TestThrewException = false; try { InsertCompleted = ep.InsertEvent(testEvent.Name, testEvent.EventType, testEvent.Location, testEvent.Date, testEvent.Description, testEvent.MaxNumberOfCharacters, testEvent.GuildID); }catch (Exception) { TestThrewException = true; }finally { //Cleanup int id = ea.GetIdOfEvent(testEvent.Name); ea.DeleteEventByID(id); } Assert.IsTrue(InsertCompleted); Assert.IsFalse(TestThrewException); }
public void TestCleanup() { ea.DeleteEventByID(testEvent.EventID); }
public bool DeleteEventByID(int eventID) { return(eventAccess.DeleteEventByID(eventID)); }