public void GetEventByNameTest_When_id_found_Then_notificationEntity() { const string eventName = "Track"; var actual = _repository.GetEventByName(eventName); Assert.Equal("You have signed up for notifications for the Hylton Track Meet", actual.Result.Message); }
public async Task <NotificationEntity> AddNumberForEvent(EventTextDto dto) { var entity = await _refRepository.GetEventByName(dto.Message); if (entity != null) { EventInformation eventInformation = new EventInformation { Message = dto.Message, From = dto.From, ProgramId = entity.ProgramId, City = dto.City, Zip = dto.Zip, SportId = entity.SportId }; await _trainingRepository.AddEvent(eventInformation); } else { entity = new NotificationEntity { Message = "You text " + dto.Message }; } return(entity); }