Esempio n. 1
0
        public async System.Threading.Tasks.Task Get()
        {
            int fluxogramaId = 7038;

            try
            {
                var draing = _drawingAppService.pr_VCM_NoDrawingSelect(fluxogramaId);
            }
            catch (Exception ex)
            {
                throw;
            }


            var             filter    = "y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077";
            List <Entidade> entidades = await _unitOfw.EntidadeRepository.EntidadesEntity(filter);


            #region Test
            //List<Entidade> entidades = _unitOfw.EntidadeRepository.EntidadesEntity(y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TopologiaId == 5077
            //                                           , y => y.Id == 224
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           , y => y.TipoEntidadeId == 224 && y.TopologiaId == 5077
            //                                           );
            #endregion

            int idCenario = _unitOfw.CenarioRepository.Get().ToList().FirstOrDefault().Id;

            HttpResponseMessage response = await _clientCall.Detail(_baseController + "Detail/" + idCenario);

            Assert.IsTrue(response.IsSuccessStatusCode);
            if (response.IsSuccessStatusCode)
            {
                var retorno = await response.Content.ReadAsStringAsync();

                RequestCenario cenario = JsonConvert.DeserializeObject <RequestCenario>(JObject.Parse(retorno)["data"].ToString());

                Assert.IsNotNull(cenario);
                Assert.AreEqual(Convert.ToInt32(idCenario), Convert.ToInt32(cenario.Id));
            }
        }