Example #1
0
        public Enderecamento GetEnderecamentoByCep(string cep)
        {
            var end = _repository.Enderecamentos.AsNoTracking()
                      .Where(EnderecamentoQueries.GetEnderecamentoByCep(cep)).FirstOrDefault();

            return(end);
        }
        public void QueryValidateFail()
        {
            var cep    = "12345678";
            var result = fakeRepos.AsQueryable()
                         .Where(EnderecamentoQueries.GetEnderecamentoByCep(cep))
                         .ToList();

            Assert.AreNotEqual(0, result.Count());
        }
        public void QueryValidateOk()
        {
            string cep    = "12345678";
            var    result = new List <Enderecamento>();

            result = fakeRepos.AsQueryable()
                     .Where(EnderecamentoQueries.GetEnderecamentoByCep(cep)).ToList();

            Assert.AreEqual(1, result.Count());
        }