public void ShouldHandleSubscriptionRequest() { string email = "*****@*****.**"; string listName = "the_daily"; var result = _subscriptionService.AddListSubscriber(email, listName); Assert.IsInstanceOf(typeof(OptInResponse), result); }
public IHttpActionResult PostOptIn(OptInRequest request) { try { var response = _subscriptionService.AddListSubscriber(request.EmailAddress, request.ListName); return(this.Ok(response)); } catch (System.Exception ex) { return(this.InternalServerError()); } }