public void AddAndDeleteSupport() { supportService.AddSupportToDatabase(constants.getSupport()); int id = supportService.GetSupportByTitleAndAuthor(constants.getSupport().Title, constants.getSupport().WritenBy); Assert.NotNull(supportService.getSupportById(id)); supportService.deleteSupportFromDatabase(id); Assert.Null(supportService.getSupportById(id)); }
public void deleteUser() { authService.createNewUser(constants.getUser().Name, constants.getUser().Password); int id = userService.getIdByNameAndPassword(constants.getNameAndPass()); eventService.createNewEvent(constants.getTestEvent().title, constants.getTestEvent().summary, id); int eventId = eventService.getEventIdByTitleAndAuthor(constants.getTestEvent().title, id); supportService.AddSupportToDatabase(new Support(constants.getSupport().Title, constants.getSupport().Summary, id)); userEventsService.joinUserToEvent(id, eventId); userService.deleteUserById(id); Assert.Null(userService.getUserById(id)); }