Ejemplo n.º 1
0
        public void DeveRetornarEnderecoBairroInvalido()
        {
            address = AddressFaker.Gerar();

            var vO = address.Generate();

            add = new Address(vO.Street, vO.Number, "", vO.City, vO.StateName, vO.Country, vO.ZipCode, vO.Abbr);

            Assert.True(add.Invalid);
        }
Ejemplo n.º 2
0
        public void DeveRetornarEnderecoCidadeInvalida()
        {
            address = AddressFaker.Gerar();

            var vO = address.Generate();

            add = new Address(vO.Street, vO.Number, vO.Neighborhood, "", vO.StateName, vO.Country, vO.ZipCode, vO.Abbr);

            Assert.True(add.Invalid);
        }
Ejemplo n.º 3
0
        public void DeveRetornarEstadoNomeInvalido()
        {
            address = AddressFaker.Gerar();

            var vO = address.Generate();

            add = new Address(vO.Street, vO.Number, vO.Neighborhood, vO.City, "", vO.Country, vO.ZipCode, vO.Abbr);

            Assert.True(add.Invalid);
        }
Ejemplo n.º 4
0
        public void DeveRetornarEnderecoCepFormatoInvalido()
        {
            address = AddressFaker.Gerar();

            var vO = address.Generate();

            add = new Address(vO.Street, vO.Number, vO.Neighborhood, vO.City, vO.StateName, vO.Country, "66.777000", vO.Abbr);

            Assert.True(add.Invalid);
        }
Ejemplo n.º 5
0
        public static Faker <Domain.Entities.School> Gerar()
        {
            Faker <Domain.Entities.School> school = new Faker <Domain.Entities.School>("pt_BR")
                                                    .RuleFor(s => s.Name, f => f.Company.CompanyName())
                                                    .RuleFor(s => s.Document, f => JuridiqueDocument())
                                                    .RuleFor(s => s.Address, AddressFaker.Gerar())
                                                    .RuleFor(s => s.Phone, f => f.Phone.PhoneNumberFormat());

            return(school);
        }
Ejemplo n.º 6
0
        public void DeveRetornarEnderecoBairroTamanhoInvalido()
        {
            address = AddressFaker.Gerar();

            var vO = address.Generate();

            int    i      = 0;
            string length = "";

            while (i < 50)
            {
                length += "teste";
                i++;
            }

            add = new Address(vO.Street, vO.Number, vO.Neighborhood + length, vO.City, vO.StateName, vO.Country, vO.ZipCode, vO.Abbr);

            Assert.True(add.Invalid);
        }
Ejemplo n.º 7
0
        public static Faker <Student> Gerar()
        {
            Faker <Student> student = new Faker <Student>("pt_BR")
                                      .RuleFor(s => s.Name, NameFaker.Gerar())
                                      .RuleFor(s => s.Parents, ParentFaker.Gerar().Generate(2))
                                      .RuleFor(s => s.Address, AddressFaker.Gerar())
                                      .RuleFor(s => s.BirthDate, f => f.Date.Soon())
                                      .RuleFor(s => s.ETypeOfEducation, f => f.PickRandom <ETypeOfEducation>())
                                      .RuleFor(s => s.AcademicYear, f => f.Date.Soon())
                                      .RuleFor(s => s.Serie, f => f.Random.Int(1))
                                      .RuleFor(s => s.Grade, f => f.Random.String(1))
                                      .RuleFor(s => s.Serie, f => f.Random.Int(1))
                                      .RuleFor(s => s.Shifts, f => f.PickRandom <EShifts>())
                                      .RuleFor(s => s.CalledNumber, f => f.Random.Int(1, 30))
                                      .RuleFor(s => s.Note, f => f.Lorem.Paragraphs(1))
                                      .RuleFor(s => s.School, SchoolFaker.Gerar())
                                      .RuleFor(s => s.Occurrences, OccurrenceFaker.Gerar().Generate(1));

            return(student);
        }