Example #1
0
        public IActionResult GetData([FromQuery] string customer)
        {
            var data = customer.ToUpper().Equals(CustomerEnum.OPEN.ToString())
                        ? openBiz.GetDiagnostic()
                        : fanBiz.GetDiagnostic();

            //IDiagnostico diagnostico = GetStrategy(customer);
            //var data = diagnostico.GetDiagnostic();

            return(Ok(data));
        }
        public void GetDiagnostic()
        {
            var data = new ResponseDataBase();

            diagnosticoDalMock.Setup(x => x.SaveInicioDiagnostico()).Returns(data);

            var response = openBiz.GetDiagnostic();

            Assert.IsNotNull(response);
            Assert.AreEqual(2, response.Count);
            diagnosticoDalMock.VerifyAll();
        }