示例#1
0
        public void Provider_Repository_Get_All()
        {
            //Act
            var result = _repository.GetAll().ToList();

            //Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(3, result.Count);
            Assert.AreEqual("Google", result[0].Name);
            Assert.AreEqual("Bing", result[1].Name);
            Assert.AreEqual("Yandex", result[2].Name);
        }
示例#2
0
        public List <Provider> GetAll()
        {
            var users = ProviderRepository.GetAll();

            if (users == null)
            {
                throw new BadRequestException(ErrorMessages.UserNoEncontrado);
            }

            var result     = new List <Provider>();
            var enumerator = users.GetEnumerator();

            while (enumerator.MoveNext())
            {
                result.Add(enumerator.Current);
            }
            return(result);
        }
示例#3
0
        private void ProvidersBtn_Click(object sender, EventArgs e)
        {
            columns = new List <Column>()
            {
                new Column()
                {
                    Name = "Identification",
                    Text = "Identificacion"
                },
                new Column()
                {
                    Name = "Name",
                    Text = "Nombre"
                },
                new Column()
                {
                    Name = "PublicName",
                    Text = "Nombre Cormercial"
                },
                new Column()
                {
                    Name = "Status",
                    Text = "Estado"
                },
                new Column()
                {
                    Name = "CreatedDate",
                    Text = "Fecha de Creacion"
                },
            };

            SetCrudName(
                text: "Proveedores",
                active: 5,
                data: providerRepo.GetAll(),
                columns: columns
                );
        }
示例#4
0
 public List <Provider> GetAll()
 {
     return(ProviderRepository.GetAll().ToList());
 }
 public IEnumerable <Provider> GetAll()
 {
     return(_repository.GetAll());
 }