public PersonRepositoryTests()
        {
            using (var scope = Container.MainContainer.BeginLifetimeScope())
            {
                _personRepository  = scope.Resolve <IPersonRepository>();
                _companyRepository = scope.Resolve <ICompanyRepository>();
                _sexRepository     = scope.Resolve <ISexRepository>();
                _roleRepository    = scope.Resolve <IRoleRepository>();

                sexTest = new Sex {
                    Code = "M", Description = "Male"
                };
                roleTest = new Role {
                    Code = "JD", Name = "Junior Developer"
                };
                companyTest = new Company {
                    Cif = "45689976", Name = "Indra"
                };

                personTest = new Person
                {
                    Dni       = "47918130E",
                    Age       = 22,
                    FirstName = "Rubén",
                    LastName  = "Arrebola de Haro",
                    Sex       = sexTest,
                    Role      = roleTest,
                    Company   = companyTest
                };
            }
        }
Beispiel #2
0
        public SexRepositoryTests()
        {
            using (var scope = Container.MainContainer.BeginLifetimeScope())
            {
                _repository = scope.Resolve <ISexRepository>();
            }

            sexTest = new Sex
            {
                Code        = "U",
                Description = "Unknown"
            };
        }
Beispiel #3
0
 public ClothController(IClothRepository clothRepository, ICategoryRepository categoryRepository, ISexRepository sexRepository)
 {
     _clothRepository    = clothRepository;
     _categoryRepository = categoryRepository;
     _sexRepository      = sexRepository;
 }
Beispiel #4
0
 public SexMenu(ISexRepository sexRepository)
 {
     _sexRepository = sexRepository;
 }