Exemple #1
0
        public void ShareBcTests_ShareQuestion()
        {
            var shareRequestModel = new ShareRequestModel
            {
                DestinationEmail = "*****@*****.**",
                ContentUrl       = $"<h2>Share Question</h2><p style='font-size: 1.2em;'> (Question Example)</p>"
            };

            var share = shareBc.ShareQuestion(shareRequestModel);

            Assert.IsTrue(share);
        }
Exemple #2
0
        public async Task <IHttpActionResult> ShareQuestion(
            [FromUri] ShareRequestModel requestModel,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            return(await ExecuteAsync <IHttpActionResult>(() =>
            {
                if (!ModelState.IsValid)
                {
                    throw new BlissException(CommonExceptionResources.AllFieldsMandatory);
                }

                var share = shareBc.ShareQuestion(requestModel);
                return Ok(new BaseExceptionResponseModel
                {
                    Status = "OK"
                });
            }, cancellationToken));
        }