Example #1
0
        public void DeleteGoal_ValidParams_ReturnsResponse()
        {
            var test = orchestrator.DeleteGoal(validDeleteGoalRequest).Result;

            Assert.IsNotNull(test);
            Assert.IsInstanceOf <DeleteGoalResponse>(test);
            Assert.IsTrue(test.DeleteSuccess);
        }
Example #2
0
        public void DeleteGoal_InvalidParams_ReturnsErrorResponse()
        {
            var test = orchestrator.DeleteGoal(invalidGoalViewModel.Id, validUsername).Result;

            Assert.IsInstanceOf <OrchestratorResponseWrapper <bool> >(test);
            Assert.IsNotNull(test);
            Assert.IsFalse(test.Model);
            Assert.AreEqual(1, test.Errors.Count);
        }
        public async Task <ActionResult> Delete(Guid goalId)
        {
            var response = await orchestrator.DeleteGoal(goalId, UserEmail);

            return(JsonResponse(response));
        }
Example #4
0
        public async Task <IHttpActionResult> DeleteGoal([FromUri] DeleteGoalRequest request)
        {
            var response = await orchestrator.DeleteGoal(request);

            return(Ok(response));
        }