public ActionResult Index()
        {
            var viewModel = new IndexViewModel
            {
                Usuarios = _usuarioServico.ObterTodos(),
                Grupos   = _grupoServico.ObterTodos(),
                Estados  = _estadoServico.ObterTodos()
            };

            return(View(viewModel));
        }
示例#2
0
        public void GetExamples_ShouldReturn_ListOfExampleEntity()
        {
            var result = service.ObterTodos();

            Assert.Multiple(() =>
            {
                repository.Verify(r => r.ObterTodos(), Times.Once);
                Assert.NotZero(result.Count);
                Assert.True(result.All(x => !string.IsNullOrEmpty(x.Nome)));
            });
        }
示例#3
0
        public ActionResult Index()
        {
            var usuarios = _usuarioServico.ObterTodos();

            return(View(usuarios));
        }