public void GetBillCategoryChartData_ValidParams_ReturnsResponse()
        {
            var test = orchestrator.GetBillCategoryChartData(validGetBillCategoryChartDataRequest).Result;

            Assert.IsNotNull(test);
            Assert.AreEqual(1, test.Data.Count);
            Assert.IsInstanceOf <GetBillCategoryChartDataResponse>(test);
        }
示例#2
0
        public void GetBillCategoryChartData_ExceptionThrown_ReturnsErrorResponse()
        {
            var test = orchestrator.GetBillCategoryChartData(invalidUserId, string.Empty).Result;

            Assert.IsInstanceOf <OrchestratorResponseWrapper <IList <KeyValuePair <string, int> > > >(test);
            Assert.IsNotNull(test);
            Assert.IsNull(test.Model);
            Assert.AreEqual(test.Errors.Count, 1);
            Assert.IsFalse(test.Success);
        }
        public async Task <ActionResult> GetCategoryChartData()
        {
            var modelWrapper = await chartOrchestrator.GetBillCategoryChartData(UserId, UserEmail);

            return(JsonResponse(modelWrapper));
        }
示例#4
0
        public async Task <IHttpActionResult> GetCategoryChartData([FromUri] GetBillCategoryChartDataRequest request)
        {
            var response = await orchestrator.GetBillCategoryChartData(request);

            return(Ok(response));
        }