Ejemplo n.º 1
0
        public void GetGoal_InvalidParams_ReturnsErrorResponse()
        {
            var test = orchestrator.GetGoal(invalidGoalViewModel.Id, validUsername).Result;

            Assert.IsInstanceOf <OrchestratorResponseWrapper <GoalViewModel> >(test);
            Assert.IsNotNull(test);
            Assert.IsNull(test.Model);
            Assert.AreEqual(1, test.Errors.Count);
        }
Ejemplo n.º 2
0
        public void GetGoal_ValidParams_ReturnsResponse()
        {
            var test = orchestrator.GetGoal(validGetGoalRequest).Result;

            Assert.IsNotNull(test);
            Assert.IsInstanceOf <GetGoalResponse>(test);
            Assert.IsNotNull(test.Goal);
            Assert.IsTrue(test.Success);
        }
Ejemplo n.º 3
0
        public async Task <ActionResult> Get(Guid goalId)
        {
            var response = await orchestrator.GetGoal(goalId, UserEmail);

            return(JsonResponse(response));
        }
Ejemplo n.º 4
0
        public async Task <IHttpActionResult> GetGoal([FromUri] GetGoalRequest request)
        {
            var response = await orchestrator.GetGoal(request);

            return(Ok(response));
        }