public UserRepositoryTest()
 {
     CleanRepositoryHelperTest.CleanDB();
     userRepository = new UserRepository();
     roleRepository = new RoleRepository();
     userTest       = new User("00000", "Maria", "Sapelli", "few3",
                               "acevedo1927", "*****@*****.**", "asd");
 }
Example #2
0
        public ReviewRepositoryTest()
        {
            reviewRepository = new ReviewRepository();

            UserRepository    userRepository    = new UserRepository();
            ProductRepository productRepository = new ProductRepository();

            CleanRepositoryHelperTest.CleanDB();
            user = new User("asapelli", "agustina", "Sapelli", "29iedi3", "ejido 1932", "*****@*****.**", "26002158");
            userRepository.AddEntity(user);
            user2 = new User("mgonzalez", "mariana", "gonzalez", "29iedi3", "ejido 1932", "*****@*****.**", "26002158");
            userRepository.AddEntity(user2);


            product = new Product("1", "Cinturon", "cinturones de tela", 500, "nike");
            productRepository.AddEntity(product);
            product2 = new Product("2", "Medias", "medias para correr", 500, "nike");
            productRepository.AddEntity(product2);

            reviewTest = new Review(user, product, "Descripcion de la review", 8);
        }
Example #3
0
        public CartRepositoryTest()
        {
            cartRepository = new CartRepository();
            ProductRepository prodRepo = new ProductRepository();
            UserRepository    userRepo = new UserRepository();

            CleanRepositoryHelperTest.CleanDB();

            cartTest = new Cart();

            cartTest.DeliveryAddress = "Ejido 209";
            cartTest.Items           = new List <CartItem>();
            cartTest.State           = Cart.INIT_CART;
            product = new Product("1", "campera", "negra", 232, "nike");
            prodRepo.AddEntity(product);
            CartItem item = new CartItem(product, 2);

            item.Cart = cartTest;
            cartTest.Items.Add(item);
            user = new User("asapelli", "agus", "Sapelli", "assqw2", "ejido 232", "*****@*****.**", "23232321");
            userRepo.AddEntity(user);
            cartTest.User = user;
        }
 public ProductRepositoryTest()
 {
     productRepository = new ProductRepository();
     productTest       = new Product("1", "remeras", "manga larga", 1093, "zara");
     CleanRepositoryHelperTest.CleanDB();
 }
Example #5
0
 public RoleRepositoryTest()
 {
     CleanRepositoryHelperTest.CleanDB();
     roleRepository = new RoleRepository();
     roleTest       = new Role("admin", "Administrador de sistema");
 }
Example #6
0
 public CategoryRepositoryTest()
 {
     categoryRepository = new CategoryRepository();
     categoryTest       = new Category("Abrigo", "Para damas, caballeros y ninos");
     CleanRepositoryHelperTest.CleanDB();
 }